Multiple different Drupal 8/9 installs on localhost all load latest site

I have a single Drupal 9 site along with three Drupal 8.9 sites installed on my localhost running MAMP. All these sites I installed with Composer. Whenever I go to any of the sites in a browser, the latest installed site loads. For example, I go to http://localhost/cat/web/ – the oldest of the four and the sole Drupal 9 site – the browser loads the content from the latest install, which is also available by going to the site at http://localhost/capulet/web/. The sites’ files are, at least as far as I can tell, as they should be on the back end, and the settings.php files point to the proper, unique databases. FWIW, I also have a dozen Drupal 7 sites on the server as well, and they all work fine.

I have searched high and low for someone with a similar issue. But no joy. As is probably obvious, I am not too competent with the configuration of .htaccess and am new to Composer and Drupal 8/9.