If you’re using Docker, the wg-easy project made it pretty easy. Otherwise I’d recommend PiVPN which worked well also with minimal setup. Setting WireGuard up from scratch was a failed endeavor multiple times for me but both of those mentioned projects made it significantly easier.