How does a VPN actually work? What are the benefits of one for home server use besides being able to more easily connect to your home network devices without opening up ports?

I consider myself pretty tech-literate so feel free to give a more-than-ELI5 answer; but i’m confused how VPNs actually work. I know what they do - route all your devices traffic back to the home network and then it goes from there onward to the internet as if the traffic originated from the home network - but i don’t even see how this is possible exactly if i’m connected to a router at some hotel or a friends place.

If i’m connected to a network outside my home, i need to use their gateway to send packets to my VPN network, right? So i’m curious how VPNs protect me when the first packet route has to go :

My device → Other persons network → Internet → My VPN server → Back to internet

The first couple hops seem necessary to get to the VPN and not secure by nature. I know the traffic can be encrypted, but isn’t that up to my device to encrypt anyway? So the VPN isnt doing any encryption really.

Can someone explain me in more detail how exactly my device connects to my VPN at home and how this helps? To me it seems like it doesnt offer any security, and the only real benefit is making devices that would be accessible on my home network - but aren’t exposed to the internet - accessible again through the VPN server.