A basic principle of "Officer Safety 101" for numerous activities is that there is safety in numbers. Whenever manpower allows it, ask for backup from as many fellow officers as is prudent, and when staffing shortages won't allow for additional personnel on the scene, use ample quantities of flares as a force multiplier. Even if backup cannot stay, perhaps they can swing by to lay out a quarter-mile stretch of smoldering potassium nitrate leading up to your location.
Another entry-level training credo for safety on the streets is to slow things down. In the case of directing traffic, that's probably already happening naturally, and while that congestion of cars is inconvenient and irritating for the passing motorists, it's of enormous benefit to responders at the scene. If you think shutting down two of the three lanes on that interstate will make the scene safer, go ahead and do it. Slow traffic can be your friend.
A third essential and elemental philosophy of officer safety is utilizing command presence. When you're setting up at the scene, position your patrol vehicle to be as visible as possible without turning your emergency lights into takedown lights that will blind oncoming drivers. When you're out of the vehicle and on your feet directing traffic, position your body to be easily seen and avoided (squared up, not sidways), and make large, unambiguous hand / arm gestures to be sure your instructions are understood.
Taking Every Possible Precaution
In 2022, four officers were reportedly struck by vehicles and subsequently died. In the previous decade (from 2012-2021) an estimated 80 officers were fatally struck by vehicles. Some of those were undoubtedly targeted felonious assaults, but the overwhelming majority of these deaths were undoubtedly preventable "accidents."