If you are having cancer treatments that are known to increase your risk of osteoporosis, your cancer doctor may advise you to take calcium and vitamin D supplements. They will usually organise a fracture risk assessment or a DXA scan before deciding whether you need to take them.
You can buy vitamin D supplements without a prescription, but always ask your GP what dose to take. If you are thinking about buying calcium supplements, talk to your doctor. You may be able to get enough calcium from your diet.