I learned everything by experimenting with it. Back in the days, that was running my own local Apache for development on Ubuntu 7.10. And then I slowly started toying with different services, eventually got my own VPS, learned to firewall and lock things down. Eventually I got into VMs which got me to learn networking and how bridges work. Later on, I played with VPNs and as my needs grew the network and routing grew as well.
You can learn from tutorials but the real learning is the hands on experience.
VMs are free and cheap to run these days, make a VM, play with it, mess it up however you want, try to fix it, reinstall it as necessary. Try to find ways a bad actor could get to it and how to prevent it.