How to Modify WP_Includes/blocks/latest_posts.php

I am a beginner in WordPress Development wanted to get some help. Iam working on a simple WordPress site. Basically the user wants the most recent post to show on the homepage. I’ve set it to show the entire Post Content and now the user does not want the title of the post to be linked to the individual post page (since the contents of the post show on the homepage).

How do I safely modify the template file to use like a something like a h2 tag instead of a href tag, which is used here in the theme. I know you can create a child theme and modify wp_content files, but I am not sure how to approach this with files in wp_include. I read something about modifying functions.php but I am not sure and would appreciate any pointers.

$  title = get_the_title($  post);         if (!$  title) {             $  title = __('(no title)');         }         $  list_items_markup .= sprintf(              '<a href="%1$  s">%2$  s</a>',             $  post_link,             $  title         );