How to hide the tags “all, publish, thrash, draft, pending” for authors posts but not for the administrator?

You need to return the $views for admins, thats why you don’t see anyting.

EDIT: IMPORTANT, you are using a action but you need to use filter

function remove_edit_post_views ($views) {
    if (!current_user_can('manage_options')) {
        unset($views['all']);
        unset($views['publish']);
        unset($views['trash']);
        unset($views['draft']);
        unset($views['pending']);

        return $views;
    }

    return $views; // this is the missing piece
}

add_filter('views_edit-post', 'remove_edit_post_views');

You can make it even shorter by doing this

function remove_edit_post_views ($views) {
    if (!current_user_can('manage_options')) return [];
    return $views;
}

add_filter('views_edit-post', 'remove_edit_post_views');