General question about module development


I was reviewing code of a contrib module to see if I understand it. Below is the code snippet from one file:


namespace DrupalmodForm;

use DrupalCoreAjaxAjaxResponse;

use DrupalCoreAjaxHtmlCommand;

use DrupalCoreFormConfigFormBase;

use DrupalCoreFormFormStateInterface;

class modConfigForm extends ConfigFormBase {

I see lot of use commands to copy code from core. As a new drupal developer, how can I tell what should be used from core. Do I need to understand entire core/every api class before developing a module? In this example, I see 4 use commands and one extend. I am lost as for what to be used from core and what needed to be extended. Could you direct me how I should proceed so I could develop modules?


Drupal version: