OSPF (and BGP) router ID should always be based on something like a loopback interface address, which is typically a /32.
This helps in terms of stability because loopback interfaces are usually implemented in software and are always up as long as the router is booted. And if the router isnt booted, well, OSPF is your least concern at that point in time.
If you dont have a loopback interface then OSPF is likely to pick and choose from the other interface IPs that are available, and if one of those interfaces goes down that would cause a router-id change, then its got to drop all neighbors and re-establish with a new router-id. This will cause disruption for traffic that would otherwise just pass through that router.