How can I programmatically get various common user profile related URLs?
The user URLs (or routes to be more &quot;Drupal correct&quot;) are defined by the core user module (core/modules/user/user.routing.yml)
E.g.
user.register:
  path: '/user/register'
  ...

user.login:
  path: '/user/login'
  ...

user.logout:
  path: '/user/logout'
  ...

user.page:
  path: '/user'
  ...

So you can programmatically build links to these routes like so:
&lt;?php

use Drupal\Core\Link;

// Replace user.login with other routes such as user.page
$user_login_link = Link::createFromRoute(
  t('User log in link'), // The link text
  'user.login', // The link URL generated from the route
);