https://docs.opnsense.org/manual/hardware.html
Depends on what features you want to enable and how many devices are using the network but a relatively recent quad core above 2ghz is probably plenty. If you want to do packet inspection or such, more Is probably better but you’re not going to need a 32 core or anything. Is there a specific reason you want a 5gb local network, or just want the fastest network you can afford?
Consider buying dedicated firewall hardware - check out “DEC677 – OPNsense Desktop Security Appliance”. I don’t have experience with opnsense hardware but I use similar for a different os. The idea is that you won’t run into compatibility issues since opnsense will test all updates on their own hardware before releasing them and should be optimised, etc.