DNS problems

Both those outputs are normal. The first returned the NULL domain (expected, since that domain is on your blocklist), and the second returned the correct IP of Pi-hole.

How are you accessing speedtest.net? If you are using a browser, check that the browser isn't using any private DNS (or DNS over https, etc), which would bypass Pi-hole.

These tools can also help you determine the source of the ads:

I will note that with Pi-hole alone running as an ad blocker, I see no ads on the speedtest.net website.