There are certain criteria, see [1] or [2] for a summary. They need to be publicly traded for sufficient time, have sufficient free float, be profitable, etc.
See [3] for example on why Tesla isn't.
[1] https://us.spindices.com/documents/methodologies/methodology...
[2] https://en.m.wikipedia.org/wiki/S%26P_500_Index#Selection_cr...
[3] https://seekingalpha.com/article/4088016-will-tesla-join-s-a...