I have a router with opnsense which has q plugin for wireguard making things quite easy for me.
A router is usually also always online and sits at the center of a network so it is the best place for it but there is nothing stopping someone from setting it up with commandline on a home device.
https://www.wireguard.com/quickstart/
There are many online video guides that cover different ways to do it (like docker)
In all casss you first setup a main server on the device that stays home and from it you generate a peer per device you want to connect. (A bunch of settings/codes) Sometimes a peer is a qr code that your device can scan (wireguard app for some devices) otherwise you have to manualy type.
Once set you can just leave it on. The only exception i found is some apps for local payments, presumably because they require both devices to report the same location to perform a transaction.