What is the difference between relative stability and absolute stability
Relative stability and absolute stability are not two different "kinds" of stability. Absolute stability is a binary thing, is the system stable or not?

Relative stability will tell you, if your system is stable, by how much can you increase the gain of the system or the phase lag of the system before it becomes unstable?

So any technique that tell you whether a system is stable or not could also be used to calculate these two relative stability metrics.

If for instance you have a system which becomes unstable if the gain is 100 but you currently have a gain of 20 then your gain margin is simply 100/20 = 5 = 14dB

If you plot the bode diagram of a system and you note that when the gain is 0dB you have -150 degrees of phase then you can see that you have -30 degrees of space between where you are and the border between stable and unstable, that means you have a phase margin of 30 degrees.