I have severe osteoporosis, can this cause headaches that last up to four days.

Generally not. Osteoporosis is a disorder of abnormal bone loss. Your other medical problems and/or medication have a higher potential to cause the headaches. Check w/your doctor.
Not usually. Osteoporosis causes loss of calcification of the bones, making them weaker. Unless you are having neck pain that is radiating to your head, headaches are usually not related to osteoporosis.