Not drinking enough water is the major reason. It can lead to concentrated urine. This can increase the risk of stone formation.
If you eat a diet high in sodium and oxalate. Eating animal protein can also cause this. It can lead to kidney stones.
In this case, family history plays a vital role. You can get kidney stones if anyone in your family has them.
Being obese can increase the risk of kidney stone formation. So, weight can also cause kidney stones.
There are a number of health Conditions that can cause this. Like urinary tract infections, gout etc. They can increase its risk.
There are a number of medicines that can cause stones. Like diuretics or calcium based antacids. So avoid them.
Less activity is bad for health. Long periods of sitting with no exercise can cause stones. It is called sedantary lifestyle.