is the old router still in place when you're connected via the switch? That would still hand out IPs via DHCP while nobody does it on a direct link.
I would check that DHCP is enabled and configured for your LAN in OPNsense. From there, plug your machine directly into the LAN port and confirm that you get an IP address from OPNsense. At that point, you should be able to get to the webui on the gateway IP; likely http://x.x.x.1.
Or other issue: Is LAN already mapped to a VLAN or to the plain interface in OPNsense?