Build your setup around an OPNSense router. Once you've got that setup, then add from there, whether it be a PoE managed switch from eBay, a NAS, camera setup, rack server, or whatever. But don't buy Ubiquiti or any other of these locked in ecosystems whatever you do.