basics of settings.php and settings.local.php? What is the up-to-date basic workflow regarding database credentials when you launch a local version of a site that is already operating remotely?

What are the considerations and how is each best addressed? Are there advanced considerations that might require one to vary the basic approach?

Thoughtful confirmations of the community's understanding welcomed. (As appropriate) I'll happily help kick off documentation. It appears not to be documented clearly elsewhere, though if someone else has seen clear documentation on each point of the workflow and related decisions, please include links in your remarks.

UPDATE:

As promised above, I've started working on improving drupal docs. I've opened an issue https://www.drupal.org/project/user_guide/issues/3013725
Its common to either include a local settings file from settings.php or create a site folder for local development (local.mysite.com) that has a settings file that will be used. In either case, both are gitignored so its only for you. This also avoids the annoying issue when Drupal locks the site folders from being written, causing git errors when pulling or switching branches.