The response from @Tristan Richard was incredibly helpful! After hours of troubleshooting and trying out all the suggestions, I finally realized that I had installed Adguard DNS. Once I turned it off, everything worked perfectly!