Now, the legitimacy of the CONSTITUTION is based on what we, collectively, agree on, however
The Constitution vests "the judicial Power of the United States" in "one supreme Court, and in such inferior Courts as the Congress may from time to time ordain and establish" [1].
That isn't the same as "ultimate authority to interpret the law." In practice, SCOTUS does usually have this power, due to Marbury and other precedent. In practice, too, it can be bullied, e.g. by FDR and potentially right now.
[1] https://constitution.congress.gov/constitution/article-3/
SCOTUS has been relied on far too much as a method of legitimation of extra-constitutional powers. People know they are lying bastard, but because the court-gods have used their holy powers to interpret the constitution as magically meaning stuff like intrastate commerce is actually interstate commerce and sawn off shotguns aren't actually protected 'arms' then many gullible zealots will actually believe that.
https://cis.org/Report/Plenary-Power-Should-Judges-Control-U...
The Supreme Court suddenly deciding that the constitution does not matter does not make their decision law, it erodes trust in that institution and removes their mandate to execute the law. Said supreme court has decided to throw away all trust in favor of giving unchecked and clearly illegal power to the executive, overriding Congress's very clear authority as delegated by the constitution.
Many of the actions taken by this Supreme Court are illegitimate and are things that will need to be reckoned with assuming that the presidency changes hands in 2028. As well as the actions by ICE and this presidency in general.