Routers and network switches aren't the same hardware—depending on your setup, you may need both.
More features and purpose-built hardware almost always wins ...
In my company's intranet we have a Managed Switch that interconnects all network elements: pf Sense firewall at 192.168.100.1 fiber modem at 192.168.1.1 my brand new D-Link AX1500 Wi-Fi 6 Router, ...