IV affects the price of an OTM option, high IV means the option has a high chance of becoming ITM. Running up to earnings, IV is high because a big move is anticipated. After earnings, the move has happened and the IV (thus the value of the option) drops. That's IV crush. To avoid it, you should buy options that have a further out expiry (lower IV) and you should buy not just before earnings but before an earnings run-up starts. Then you can sell either right before earnings to profit from the increase in IV or you can hold through earnings if you are confident it will move ITM far enough to offset the drop in IV. Play the earnings run-up, or if you're gonna hold through earnings make sure the expiry is far out. Buying right before and selling right after maximizes your chance of getting fucked by IV crush, especially if you are playing with a close expiry.