My friend has osteopenia. How do I avoid getting it?

Calcium. Daily calcium supplements and weight-bearing exercise help build bone strength and protects against osteoporosis.
Bone loss. Osteopenia is low bone density. This is often genetic. Low bone mass is a risk for the development of osteoporosis which is bone at risk of fractures. If you smoke, quit. Weight bearing exercise increases muscle mass and strengthen your bones. Decrease carbonated drinks. Take vitamin d and calcium supplement. Moderate exposure to sunlight (with sunscreen) also activates your body's vitamin d.