Found this article that says the credit would be retroactive back to purchases made after May 24, 2021. There seems to be conflicting information out there right now so may need to be verified.
https://www.voltequity.com/post/the-clean-energy-for-america-act-and-its-potential-impact-on-tesla