Composer 2 and CiviCRM Installation Error
As per comments there were some leftover installed vendor files and removing composer.lock and the entire vendor folder and also web/modules/contrib/civicrm and then trying again clears it.