You need a negative Covid test no more than 72 hours before you fly. You're supposed to test again 3-5 days after arrival AND isolate for 7 days. But it's hard to tell whether that last bit is mandatory (must vs. should).
The USA is presently accepting rapid tests if they're from a proper lab with all the right info.
However, airlines and the airports you transit through might have different rules. So check ALL of that. The CDC page doesn't say the info must be in English, but the airline decides whether or not to let you board.
Example: I recently looked at a flight that would transit via Amsterdam. The KLM website had a yellow banner saying that you need a negative PCR test not more than 72 hours before the flight AND a negative rapid test not more than 4 hours before the flight.

No thanks. Weirdly, Air France's website didn't display this info, or if they did it wasn't as obvious.
Edit - You also need to sign an attestation form, stating that the test information you provide is true and correct, and that if you've falsified it you've broken the law. Here's the PDF:
https://www.cdc.gov/quarantine/pdf/a...21-01-12-p.pdf