I add some comments about the phase shift.
The phase shift show here

is the phase shift between the input and the output terminal of an amplifier without any feedback.
Next what you should do is to ask yourself a question what -180° really means?
It means that the voltage at the output is reversed (180° out of phase).
And now if we add a feedback network and feed back this signal to the inverting input we will receive a positive feedback amplifier ( the output voltage will start to rise).

This unwanted phase shift inside amplifier are caused by a parasitic component (capacitor or inductor). These two components provide inertia in the circuit because the electric field and magnetic field cannot change instantaneously, the time is needed. And this is why we have a phase shift in the amplifier.
And here you can see how "number" of "pole's" affect the phase shift

Here you can see how phase margin affects the step respond

As you can see the phase margin and "circuit speed" are inversely related.
EDIT
The simplest closed loop system will look like this

Where:
\$ A \$ is open-loop gain ( forward gain )
\$\beta \$ feedback factor ( feedback network gain )
In this case \$ \beta = \frac{V_C}{V_D} = \frac{R_Y}{R_X+R_Y}\$
Based on this we can write this equation because we want to find the closed loop gain
\$A_{CL} = \frac{V_{OUT}}{V_{IN}} = \frac{V_D}{V_A}\$
So we have
\$V_D = V_B \cdot A \$ (1)
\$V_B = V_A – V_C \$ (2)
\$V_C = V_D \cdot β \$ (3)
And now we can calculate the closed loop gain, substitute 1 to 2
\$ V_D = (V_A – V_C) \cdot A = V_A \textrm{A} - V_C \textrm{A}\$ (4)
Now we take 3 (VC = VD*β) and substitute to 4
\$V_D =V_A \textrm{A} - V_C \textrm{A}= V_A\textrm{A} - V_D β \:\textrm{A} \$
\$ V_D + V_D \cdot β \cdot A = A \cdot V_A \$
\$ V_D (1 + Aβ) = A\cdot V_A\$
And finally
$$A_{CL} = \frac{V_{OUT}}{V_{IN}} = \frac{V_D}{V_A} = \frac{A}{1 + Aβ}$$
This is a very important equation. If we divide this by A we get:
$$ A_{CL} = \frac{1}{(1/A) + \beta} $$
We can see that the closed loop gain is equal to
\$\Large \frac{1}{\beta} = 1 +\frac{R_X}{R_Y}\$ do you recognizing this equation?
If the open loop gain \$A\$ is very large (ideally \$A = \infty \$) approaching infinity.
But let us back to this form
$$A_{CL} =\frac{A}{1 + Aβ}$$
This equation is true for negative feedback circuits.
And let us see what will happens if \$A\beta = 1\$ (at some frequency)
$$A_{CL} =\frac{A}{1 + Aβ} = \frac{1}{1 + 1} = 0.5$$
For negative feedback circuit.
But let us see what will happen if we add delay equal to 180 degrees phase shift at some frequency. The 180 degrees is just reversing the sign of a sinewave.
Hence, what was negative feedback became positive feedback.
Therefore \$Aβ\$ became \$-1\$
And denominator of \$A/(1+Aβ)\$ changes from sum to difference.
So the closed loop gain is \$A_{CL} =\frac{A}{1 - Aβ}\$ (positive feedback).
And again if at some frequency we have \$A\beta = 1\$
The closed loop gain becoming
$$A_{CL} =\frac{A}{1 - Aβ} = \frac{1}{ 1 - 1 } = \frac{1}{0}$$
Wow, we just create an amplifier with infinite gain even though the open-loop gain A is not infinity. This means that we can have output with zero volts at the input.
In the real world, the amplifier (with negative feedback) will oscillate at the frequency where this two contrition are met.
The magnitude of a loop gain \$A\beta(j\omega) = 1\ \$ (0dB) and the additional phase shift reaches a value of -180deg.
<----------------------------------------------------->
Also, I noticed that you have troubles with recognizing the type of a feedback in the amplifier circuits.
The Negative feedback vs Positive feedback at "DC".

1 - Any rise in the voltage at point X will cause that the voltage at point Z also will rise.So if we connect together these two points (X and Z) we will have a Positive feedback on the circuit.
In this case (DC) the positive feedback dos not automatically means osculations. Instead of an oscillation, the circuit can latch at the positive or negative rail.
2 - This time any rise in voltage at point A corresponds to the voltage drop at point D. So, if we connect this two points together (A with D) we will end with a Negative feedback circuit.
Try is yourself.
As a homework try recognize the type of a feedback in this two circuits
The first circuit

And the second circuit

The feedback resistor is \$R_{FB}\$