Objective: To find shortest path from given node to every other node.
This is probably the simplest explanation what the underlying math for OSFP is:
https://youtu.be/pVfj6mxhdMw
This knowledge is not required to work with the protocols. But some rules have to be applied to make the algorithm applicable to given situation. Those rules is what knowing OSPF is all about. Dijkstra algorithm is like a black box which figures out shortest path. Check it out if you are interested. It is also used in GPS navigation....