Why do websites sometimes load slow even if internet speed is good?

It can be a DNS issue. If DNS resolution is slow, your browser takes longer to find the website’s IP. Latency and server response also play a role, not just bandwidth.