Inside of a post’s loop (or where the first parameter to get_post_type() is a WP_Post object, or ID of a post):

1
2
3
4
5
<?php
     $postType = get_post_type_object(get_post_type($post));
     $postType = $postType->singular_label;
     echo $postType;
?>

(See https://developer.wordpress.org/reference/functions/get_post_type/ for reference to the “get_post_type” function).