@gillesdeb when you write code, you should develop it on an environment as close to your live environment as possible.
local development is often done using a stack of PHP, Apache & MySQL, (or sometimes PHP, NGINX, MariaDB) Whether you install those natively (as you describe 'using Terminal to host a server') or via MAMP it amounts to the much same thing.
The issue with installing this locally is matching and locking your versions to match those of your remote. Eg you could be running PHP 7.4 locally and publish up to PHP 7.3 which could mean stuff doesn't work. Likewise you might have MySQL 5 locally and MySQL 8 on your remote.
To that ends, you can locally develop using virtual machines or docker instances. This allows you to lock versions in config and also run different versions of php / MySQL etc to your native installed versions and provides more consistency and reliability. You can also see performance improvements as you get less issues with DNS and memory usage.
I would recommend looking at homestead which uses vagrant https://laravel.com/docs/8.x/homestead
and https://github.com/sinnbeck/laravel-served for docker.
@sinnbeck is very active on laracasts and you'll see a number of threads explaining about the package here.