Instead of building one from scratch why not simply use one of the already made router operating systems? I would personally recommend opnsense, it has a nice easy to use web UI and can be setup in like maybe 20min.
as for hardware you can use just about anything but i highly recommend these cute little dedicated router boxes. It is passively cooled, plenty powerful to handle wireguard VPN at gigabit speeds and should easily last you many many years without an issue.