For learning about a VPN I'd recommend the wireguard whitepaper. Short and very helpful. Also get your hands dirty and set up a personal VPN.
If you just use wireguard then you have free reign to make any topology you want. And then you get to troubleshoot the routing mess you've made.
It's a continually occurring question here on HN, is there a particular programming language you want to learn, or are you just looking to understand the whole stack from ethernet interfaces / arp / ip4 / tcp, udp, dns, dhcp, etc?
For me, it's been decades since I first grokked what a subnet mask is.
This guide by Beej is pretty good https://beej.us/guide/bgnet0/, he has a similae one on Network programming.
Also reading TCP and IP RFCs will greatly help you.
Get a copy of Computer Networking: A Top-down Approach by Jim Kurose.
Read the first 500 pages until you get to the physical layer. Skim the back half of the book on funky protocols like Bluetooth, satellite and cell phones.
The industry standard for learning networking is CCNA. Yes, it’s proprietary.
In the mean time download Packet Tracer. It’s Cisco’s educational simulator for routers and switches. You can interconnect devices and also connect into the devices to configure them.