A quick reference for code developers that shows to access the parameters of various Joomla extensions types.

Retrieve the params of Components.

use Joomla\CMS\Component\ComponentHelper;
$params = ComponentHelper::getParams( 'com_example' );
$my_field = $params->get( 'field_name' ); 

 This method can be used in the Admin or Site scope and 'com_example' can be the current component or another component.

use Joomla\CMS\Factory;
$app       = Factory::getApplication();
$params    = $app->getParams();
$my_field  = $params->get('field_name');

Using the getParams method of the Factory class will retrieve the components parameters and the menu parameters including the title for the current component, however getParams is only available in the Site, front-end, in the SiteApplication class.

If you attempt to use it in Administrattor scope you will receive the following message, Call to undefined method Joomla\CMS\Application\AdministratorApplication::getParams() .  For more inforamtion read  https://github.com/joomla/joomla-cms/blob/715eed2f8020763ac7e62717ec552eb522959c45/libraries/src/Application/SiteApplication.php#L302