Hide contextual filter parameter from view url
I don't think this is possible if you show the view as a page, but you might be able to solve the problem by creating a custom route and rendering the view on that page, where you fetch the uid programatically.

You must do something like this in your Controller:

$user_id = 1;
$args = [$user_id];
$view = Drupal\views\Views::getView('my_view_id');
if (is_object($view)) {
  $view-&gt;setArguments($args);
  $view-&gt;setDisplay('page');
  $view-&gt;preExecute();
  $view-&gt;execute();
  return $view-&gt;buildRenderable('page', $args);
}