PiVPN, as I understand it, let’s me connect my phone from anywhere to my network and use pi-hole.
Correct. (It can also work without Pihole, btw)
It also protects me in unsafe wifi hotspots.
Yes and no… 99% of your internet use is over https and VPNs “for safety” are overated by scammy marketting campaigns. Modern web is designed to be accessed from wireless networks outside your home.
In particular, no legal bank would operate unsafely.
But I can’t change my location
It’s a question of point of view. It changes your location to your home. That can be really useful to access content geolock’d to your own country when you’re away.
Note that using a VPN with the purpose of looking like you’re coming from somewhere you aren’t is a rather dark grey area. Public VPNs are advertising this use, but it isn’t legal. (In France, some argue that advertising means the user is usikg the VPN as provided, and not responsible. Never tested in court.)
and my data is not anonymous
Correct. The goal of a VPN is to connect to a seperate network, in your case your home.
Whoever told you a VPN is to be anonymous is a scammer. Either you use your own VPN which doesn’t make you anonymous at all, else you connect to a VPN used by other people, at which point both the wifi and the website can know you’re using an IP used by VPNs and the VPN can identify you.
since it can be grabbed outside my home network, right?
The data can’t be grabbed, it’s encrypted by the VPN (and, ideally, by the application layer too, like HTTPS)
The wifi network will see metadata, like when you connected, that you connected to your home network, etc.
Without a VPN, they could also see the domain, because it’s sent in plaintext by HTTPS under some conditions.