Calcium, Vit D, and Iron might help if you've got brittle bones and a poor diet and glucosamine, chondroitin, and hydrolysed collagen might help if the problem is more joint related and not about bone density/gelatin but you'd need to take these supps long term to stand a chance of getting any real benefits from using them. There's also some modern research peptides people are using these days that some users rave about but I've got no experience with those so I can't comment.
You've said you've been inactive for sometime now and tbh that won't be helping you much because if your muscles are weak you will be putting extra stress on bones/joints to support your bodyweight just doing simple things like walking, standing up/sitting down, and carrying out normal everyday activities.
My advice, start getting some regular moderate intensity exercise and eat a varied/balanced diet. You can use supplements too as a booster for vitamins and minerals but wholesome fresh food should be the main priority.
I don't know your age but maybe ask your family members if arthritis or osteoporosis have been common within your relatives as clicking bones might just be a sign of something hereditary you can't do much about. If you're feeling pain as well as hearing clicking sounds....go and see a Doctor.