Overriding the User entity list_builder handler
my_module.module :

&lt;?php

use Drupal\my_module\MyModuleListBuilder;

function my_module_entity_type_alter(array &amp;$entity_types) {
  $entity_types['user']-&gt;setHandlerClass('list_builder', MyModuleListBuilder::class);
// $entity_types['user']-&gt;setListBuilderClass(MyModuleListBuilder::class); // Other solution possible
}


my_module\src\MyModuleUserListBuilder.php :

&lt;?php

namespace Drupal\my_module;

use Drupal\user\UserListBuilder;

class MyModuleListBuilder extends UserListBuilder {
    // Implement the function you want to edit
}