I figured it out. My host provided a stock WP CentOS image, and it has a pre-loaded admin account. Whenever I switched from IP to URL format in the settings, it must have reverted back to that original admin account instead of the one I set up. I’ve reported the bug to them.
I think it’s a plugin. I’m going to reinstall it from scratch and manually add each plugin individually until I find the one that is causing problems.
I tried reinstalling the server from scratch after messing around with the nginx configuration files. It seems like there’s an issue that occurs when I try to access the page using my domain rather than my IP. Accessing it via IP works, but when I change the WordPress settings to default to access it via the domain, my wp-admin page is replaced by a weird authentication prompt in the browser which doesn’t allow me to log in.