4.1 Use Composer

To download modules

composer require drupal/admin_toolbar

To install modules

drupal module:install admin_toolbar

To Export Configuration

drupal config:export

Push your repo to Git so everyone can work with your changes.

4.2 Sync local repo with remote

To get the latest module and theme installs and the latest code from your team ftech the repo each time you start work.

git fetch | merge

Now your repo has the updated composer.json file (and the latest site config.) But you need to install anything added to the composer.json file by other developers.

composer install

This installs the modules newly added by other developers. But we also need to import the changes to config made by them...

drupal config:import

Remember that any changes (installed modules and themes and changes to config) were exported by other developers before they added | committed |pushed to the github repo… So we need to import them… and conversely you need to remember to export your config and commit them to the repo before you push to the remote repo.

Lastly, always...

drupal cache:rebuild all