How have you configured the router ?
Post a copy of the config, removing any passwords, and other sensitive information, and then we can get a better idea of what the problem might be. Also a simple diagram would help to clarify your description.
My thoughts are that the router needs to connect to the L3 switch using a VLAN trunk. This is done using subinterfaces on the router, each with an IP address in it’s particular VLAN. Then you can distribute these subnets in OSPF, and pass the traffic from the router to each VLAN. But seeing the existing config, and a basic diagram will help a lot in sorting your problem.