Hello
The word "avert" means to prevent or ward off (an undesirable occurrence). For example, "We tried to avert our thoughts from our massive financial problems."
To "avoid" something means to miss it. For example, "The driver of the car swerved out of the way, to avoid an accident."
But avert also means “prevent” or “ward off,” a sense it shares with avoid. However, while "avert" implies active effort to stop something from happening, "avoid" often suggests keeping away from or refraining from something rather than stoping it from happening.
I hope that helps!