Sounds like packet loss over wifi, which means you are dropping data and it needs to be re-sent. Sure your ping is great for the data that makes it through to the internet, but ping isn’t everything and doesn’t account for data that doesn’t make it and needs to be re-transmitted.
If your connection works fine over wired then you need to look at things such as wifi interference, and perhaps change the channel your wifi is using. If you are living in a very wifi congested area, such as a large apartment building, then your options over wifi may be limited.