No idea why it's slow.That 5.23s explains the problem, especially when curl is using a 3 second timeout. Why do you think Google DNS is so slow? Do you live in a remote area?
Recently upgraded to T-Mobile Fiber at 2g / 2g. There were a few setup issues. Requested a static IP but speeds dropped significantly and am now back on CGNAT.