Very Slow External Web UI, But Local IP is Unaffected

Hello everyone,

Operating System: Ubuntu Server 21.04
Architecture: ARM64
Hardware: Raspberry Pi 4B
Installation Method: Snap
Nextcloud Version 21.0.1

I am having a very interesting problem with my external domain for my Nextcloud Server where each page takes 30 seconds to 1 minute to load. This problem randomly started happening without me changing any settings. The web GUI internal IP is completely unaffected and loads pages within 1-2 seconds. But here it the really weird part: if I navigate through the slow GUI of the external domain and download a file, the file downloads at 20MB/s. So I know it is not my internet connection (180 mbits per second upload and download). Or some sort of hardware limitation of the Raspberry Pi. To make things even more complicated, if I untrust the domain in the config.php file and reload the page it gives the “access through untrusted domain” message but the page loads at normal speed (1-2 seconds. I have tried restarting the server, updating nextcloud and updating the operating system.

Any help is greatly appreciated!
Thanks in advance, Aaiden