> Try this code

    $post = get_queried_object();
    $postType = get_post_type_object(get_post_type($post));
    if ($postType) {
        echo esc_html($postType->labels->singular_name);
    }