Speed is considered one of many ranking factors. I think less because Google explicitly says "we will rank you higher if your site is faster" and more "the user behaviors we track will improve if your site is faster".
This is things like going from the SERP -> Site -> Back to the SERP.
That's implicitly telling Google that the site didn't satisfy their search intent and something they for sure track.
Maybe the user clicked back b/c the page didn't load fast enough, maybe the content was bad but either way it's a search quality signal.
That being said, if you return results too quickly then Google will hit your site more frequently. In our case, it's been frequently enough such that we'll give Googlegot a 429 response. Interestingly enough, the Google Search Console does not acknowledge 429s, but misreports them as 500s.
I agree site speed is very important, but I don't buy into the SEO argument. Some of the most popular sites in the world take ages to load.