Biden's legal justification for student debt forgiveness was the 2003 Hero's Act, which allowed the Secretary of Education to discharge student loans debt in times of national emergency (like a Pandemic).
Trump cited this enabling law when he halted student loan payments.
The Supreme Court, invented a new legal theory called the "major questions doctrine" they self-cited as justification to end this policy. The Supreme Court is not a King either, though clearly they want to be.