Get Last Register User's ID I am trying to retrieve the details of the last user who registered to the site. There is a similar question here: How to get the uid of a newly created user?
but it assumes that the registration is also done programmatically, while I don't have any such assumption.

The only way I saw how to do it was to go to the DB directly (not recommended by basically every resource I read). Is there a way to do this through some other interface?
You don't need to query the DB directly, you can use an entity query:

$uids = \Drupal::entityQuery('user')
  -&gt;sort('created', 'DESC')
  -&gt;range(0, 1)
  -&gt;execute();
$uid = reset($uids);