Here is the code in 2 parts:
1st part - function with PHP and CSS - to hide the username in the dashboard area with the admin_head hook:
/* Hide username in WordPress dashboard area*/
function hideAdmin() {
echo '<style>
.wp-list-table tr[id="user-2"]{ display:none; }
</style>';
}
add_action('admin_head', 'hideAdmin');
2nd part - function with PHP and CSS - to hide the number of administrators above:
/*Hide the count of the administrator in the WordPress dashboard area*/
function hide_user_count() {
echo '<style>
.wp-admin.users-php span.count {
display: none;
}
</style>';
}
add_action('admin_head', 'hide_user_count');
Here is a post from where I took part of the code: https://trickspanda.com/hide-specific-admin-user-list-wordpress/