He announced a broad cancellation that was going to happen months in the future, and the courts paused and then later said it wasn’t allowed. If it had progressed very quickly it would have been harder to block. One could argue it was intended to give the court a chance to block it.
This current forgiveness is an executive order, so if it’s not completed by the time Trump is the executive he can stop it easily.
The Supreme Court denial is just words. He stopped implementing the previous plan because he accepted and followed those words, but he could not. Maybe his bureaucracy will reject him and refuse to go against the Supreme Court words, but that’s a question for his bureaucracy.
And yes, that’s how coups work. Sometimes the army/police/whatever backs down because some other entity in the civil power structure says “you can’t do that”. And other times, they don’t. It’s all decided based on the perceived power and righteousness of the two sides, not because the court just decides stuff and then it happens by some sort of magic.