customization – How to use custom page for all posts with custom url, call another directory?

I have tried many different codes:

 <a href="<?php echo get_template_part( 'template/test/post' ); ?>"> Test 1</a> 
<a href="<?php echo get_template_directory_uri(); ?>/template/posts.php"> Test 2 </a> 
<a href="<?php bloginfo('template_url'); ?>/template/posts.php"> Test 3</a> 
<a href="<?php echo get_page_link( '/template/posts.php' ); ?>">Test 4</a> 

I am getting URLs like this

enter image description here

I am using the code (Test 1) :

<a href="<?php echo get_template_part( 'template/test/post' ); ?>"

and Coming to this page after clicking:

enter image description here

I want to create a separate template page for all the posts.
enter image description here

But writing any PHP code on that custom page is getting errors.
enter image description here

how do I include the header (<?php get_header(); ?>) footer and posts loop?
That’s my code on posts.php

<?php get_header(); ?>
<?php 
    $blog_args = (get_query_var('paged')) ? get_query_var('paged') : 1; 
    $blog_args = array (
    'post_type' => 'post',
    'paged' => $blog_args
    );
    $blog_posts = new WP_Query($blog_args);
    while($blog_posts->have_posts()) { 
    $blog_posts->the_post();
?>

<a href="<?php the_permalink( ) ?>"> <?php echo wp_trim_words( get_the_title(), 5 ); ?></a>
<?php echo substr( get_the_excerpt(), 0, 94,)."..."; ?>


<?php } ?>
<?php wp_reset_postdata() ?>