I added my domain to the host file when I first set up the Ubuntu 22.04 server. Nextcloud AIO was installed after the fact, and it worked fine until recently, so it is odd that all of a sudden this became a problem.
I followed the instructions in the book, “Mastering Ubuntu Server: Explore the versatile, powerful Linux Server distribution Ubuntu 22.04 with this comprehensive guide, 4th Edition” by Jay LaCroix who states that it is best practice to add the domain to the hosts file when setting up Nextcloud. So I followed his instructions from the book.
In any case, thanks for your help figuring this out!