I swapped to old PHP 7.4 to update a WordPress project. I then could not switch back to 8.2+. I had the Laravel installer in the global composer dependency, which prevented running composer global update
Go to /Users/mike/.composer/
and temporarily remove the Laravel installer to be able to swap, then can probably put it back afterwards.