Many of us have the problems installing Laravel 10 via composer without using sudo update-alternatives --config php
.
Default command from Laravel website does not work if you default php version is lower the php8.1 and you want to keep your old php7.4 version.
So if you run composer create-project laravel/laravel example-app
and you have php7.4 ... the Laravel 8 will be installed.
That's why I post here my solution.