The router ID is used by OSPF routers to easily identify neighbors on the network in order to establish a relation. In short, it is a unique name given to the router.
when the link state database gets built from the ospf routing protocol. The routing ID is essentially the name for that router in that database. Most routers will have R1, R2, etc. a network engineer would set their ids typically as 1.1.1.1, 2.2.2.2 etc. to follow that pattern, its kind of important so you know which router is which when you're looking into the LS database