All the optimisations in the world will not make up for slow hosting: it is the foundation.
What counts
- Server quality (processor, memory, fast SSD/NVMe storage).
- Hosting tuned for WordPress (managed hosting, ideally).
- A recent PHP version (faster and more secure).
Shared, VPS or managed?
Shared hosting is fine to start with; a high-traffic site will benefit from moving to a VPS or to managed WordPress hosting.
Key takeaway: quality hosting plus a recent PHP version already gives you a fast foundation.