Create a link to the fist item of a specific view block
Since this is a view block, you might be better of directly accessing the view:

$results = views_get_view_result('my_view', 'block1')


Where block1 is the Views display ID. Leave it blank to utilize the default display.

Then

$node = $results[0];
$url = $node-&gt;toUrl()-&gt;toString();
$link = \Drupal::l('My link', $node-&gt;toUrl());