WiFi slow on MacBook Pro but not on other devices
As with all mysteries such as these, it is best to narrow the tree of possibilities with a sort of binary search, as it were.

Here are some starting point (and if you're lucky, ending point) tests to eliminate whole branches from the tree:


Test a wired connection. You've already done this test ✅, so now we know:


It's not a hardware problem with the possible exception of wifi-specific hardware, which is highly unlikely, especially given the symptoms you report.
It's not an OS problem, again with the possible exception of wifi-specific components, which I think is also unlikely.

Boot your Mac in safe mode.  Run the speed tests again. If the problem is gone, follow the steps under If the issue doesn't continue in safe mode at the provided link. If it is NOT gone, I would hold off on OS reinstall recommended by If the issue continues in safe mode fo now, trying the things below first.
Test it on an entirely different WiFi network. This might narrow it down to your router or how your Mac connects to that router via WiFi. If it turns out to be this, report back and we can go from here.
Test whether the flatlining is system wide when it occurs. First open a browser window open with a quickly loading web page already loaded. Run a speed test. When it flatlines and while it is flatlined, refresh the webpage. Does the webpage refresh stall too? It would be best if your speed test is not running in the same process as your web page test. If it is browser based, use a different speed test that isn't, or use different browsers (e.g. Safari and Firefox). Alternatively, use something other than a web page to see if the speedtest stall is a system-wide stall.
Test using a different browser, or a non-browser-based speed test.


I can come up with more but let's start with these.