By configuring the priority for OSPF equal-cost routes, you can select the route of high priority as the next hop.
The nexthop command selects the next hop with the highest priority from the equal-cost routes calculated by OSPF. The smaller the weight is, the higher the routing priority is. By default, the weight value is 255, indicating that load is balanced between the equal-cost routes.