By controlling risk factors like obesity, smoking, and prolonged immobility, pulmonary embolism can be avoided. To stop blood clots from developing, doctors may also prescribe blood-thinning drugs. Compression stockings may be advised for people with limited mobility or those who are bedridden. It's crucial to talk about prevention measures with your doctor.