Couldn't access my Nextcloud server unless the Pi is connected to a different switch from computers with wired connections

This seems to be more of a networking question than a Nextcloud question, I know, but I’ll ask anyway.

My Raspberry Pi was connected to a switch in the basement (formerly a router). I decided to move it to my bedroom that has a dedicated unmanaged switch. However, for some reason, any PCs that are connected to that switch couldn’t connect to it with its public URL, but the ones outside (i.e. PCs that aren’t plugged to my switch or devices connected via WiFi) are perfectly fine. Also, if I connect my PC to PIA VPN, it can access the server. However, using local IP is fine for my PCs plugged to my switch.

It’s boggling my mind because I’ve been trying to figure out what went wrong with the configuration. Thought it was my PiHole at first, but I was doing chores in the basement, and the PC there was able to connect to it. That’s when I realized that my Nextcloud server is perfectly fine.

In the meantime, I’m just gonna move my file server in the basement.