After setting up the technical side (which you can test with a site like https://www.mail-tester.com), you need an IP (v4) without a bad reputation. This is the hardest part, because it's less easy to control.
If your IP has been used to send spam, or sometimes even the neighbouring IP's, you won't get through to a lot of providers.
These are the best places (in my experience) to check IP reputation:
https://talosintelligence.com/reputation_center/lookup https://senderscore.org https://www.barracudacentral.org/lookups/lookup-reputation
And also check for blacklists, for example with https://mxtoolbox.com/blacklists.aspx.
If your IP is on a blacklist, you can remove is most of the time by requesting it via their (90's looking) websites.
Also, if you send a lot of mail, Microsoft and Google have programs for senders to monitor reputation:
https://sendersupport.olc.protection.outlook.com/snds/ https://www.gmail.com/postmaster/
But... even with an IP with a neutral reputation, your mails may be sent to the spambox. You need some volume of legitimate email over time to build trust (this is called warming up an IP).