Move a WordPress site to a new address with the wrong values in the database and you can lock yourself out of the login page. Two constants in wp-config.php are the quick way back in.
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );
Put them above the line that says to stop editing. According to the documentation, WP_HOME overrides the home value in the wp_options table and WP_SITEURL does the same for siteurl, in both cases without changing the database. The settings fields in the admin then show the URLs but cannot be edited.
That makes it a good rescue move after a move or a typo in Settings, General. The site comes up on the address you wrote down, you log in, and you fix things properly.
Caveats: the database still holds the old values. If you remove the lines later, WordPress goes back to them, so the permanent fix is wp search-replace or correcting the options with wp option update home and wp option update siteurl. Also use the full address with https:// and without a trailing slash. A wrong value here gives redirect loops.
The two usually hold the same address, apart from sites that keep WordPress in a subfolder while the front page lives at the root.
Further reading: Editing wp-config.php, WP_HOME and WP_SITEURL (WordPress Advanced Administration)
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more