Hello,
exactly. If you do not manually specify a router ID, OSPF will choose the highest IP address of an active interface; if there is a loopback interface, the address of that interface will become the router ID.
By the way, if you manually configure a router ID with the 'router-id' command, the number you choose is completely arbitrary, and does not need to be related to any IP addresses configured on the router. Manually configuring router ID's can be advisable sometimes, since it gives you total control of the numbering scheme in use.
Regards,
GNT