You’ll need to use get_posts()
to get the latest post, then pass it to get_the_permalink()
to get the URL to it:
<?php
$latest_posts = get_posts( array( 'numberposts' => 1 ) );
if ( ! empty( $latest_posts ) ) :
$latest_post = $latest_posts[0];
if ( $latest_post->ID !== get_the_ID() ) :
?>
<a href="https://wordpress.stackexchange.com/questions/284553/<?php echo get_the_permalink( $latest_post ); ?>"><img src="https://echomartin.com/unit418/wp-content/uploads/2017/10/arrows-last.png" alt="Last"></a>
<?php
endif;
endif;
?>
Note that I used $latest_post->ID !== get_the_ID()
to check if we were already on the latest post, and to only output the link if we weren’t.