In fact, it is not the subnets but the ospf interface specification has reached the upper limit. If a network segment advertised by the network command contains an interface IP address, the interface is counted. You can run the display ospf cumulative command to check the number of ospf up interfaces.
Please try to delete some subnets that are advertised by using the
network command and import these subnets into OSPF through
import+policy mode.