Remove links in the login block
Method #1

Implement hook_preprocess_block() in your module/theme.

/**
 * Implements hook_preprocess_HOOK().
 */
function HOOK_preprocess_block__user_login_block(&amp;$variables) {
  $variables['content']['user_links']['#access'] = FALSE;
}


Method #2

Override block--user-login-block.html.twig template and replace {{ content }} with the following {{ content|without('user_links') }}.

Note that hiding those links would not protect respective pages (user/register and user/password) from direct access.