Does your hosting provider affect SEO?
Indirectly, yes: Google rewards fast, stable websites, and your hosting determines part of the load time and uptime. A slow or frequently unreachable host costs you positions. Between good providers the SEO difference is small; optimizing your site itself matters more.
Google uses site speed and user experience (the Core Web Vitals) as ranking factors. The server is the first link in that chain: how fast it responds before your site even starts loading. Slow budget servers and overcrowded shared hosting show up there; modern providers with NVMe storage and good caching do fine.
Server location plays a minor role: a server near your audience responds faster. For a US audience, hosting in the US makes sense; a CDN largely evens out the rest. More interesting is consistency: a host that slows down every day at peak time drags your metrics down invisibly.
More important than choosing between two good hosts is what you do yourself: optimized images, caching, a light theme, and restraint with plugins. A well-built site on a mid-tier host beats a sluggish site on premium hosting every time. Pick a solid provider, then put your energy into the site.