76% of kidney stones are formed as calcium oxalate kidney stones. These types of stones can form for a number of reasons. Some or all may apply to you.
A breakdown in the population of oxalobacter formigenes in your gut microbiome. Correcting what may be causing your microbiome disruption may help.
Consumption of high oxalates plants such as turmeric, spinach, rhubarb, sorrel, rice bran, almond, miso, sesame seed, baked potato, soy flour, navy bean, beets, cocoa powder, brown rice flour, cornmeal, okra and more. (ranked from highest to lowest)
Vitamin K2 deficiency leads to an increase in free circulating calcium, replenishing K2 with pasture raised ruminant animal meat can help drive free circulating calcium in blood & urine into the bones and teeth.
Orally supplementing vitamin D. Naturally we would have never consumed vitamin D without K2 as the foods that vitamin D occurs if that food was well raised it would also contain K2. The reason vitamin D supplementation can be indirectly linked to kidney stones is because it increases the intestinal absorption of calcium and without the K2 that we should have the calcium hangs around in body in places where it should not be accumulating in the blood, urine and arterial walls. YIKES you do not want calcium in your arterial walls!
Insufficient consumption of quality fat for the digestion of fat soluble vitamins like A, D, E and K important for proper kidney function.
Inadequate bile flow will prevent the digestion of quality fats for the absorption of fat soluble vitamins like A, D, E and K important for proper kidney function. It is important to consume enough choline as bile if formed as 10 parts phosphatidyl choline and 1 part cholesterol. If their is a deficiency in this key nutrient bile production in the liver will suffer.
A genetic variation in the PEMT can affect the production of bile as the body can synthesize its own choline however this is a very energy and nutrient intensive process and it will cost you so better to just consume the animal foods that are a rich source of choline. Ruminant animal meat tends to have the highest levels of choline. Even someone with a perfectly functioning PEMT can become choline deficient, all humans have a requirement for dietary choline some may be able to rely on plant source dietary choline however massive amounts would have to be consumed to reach sufficiency and it is simply not realistic nor would I recommend you do so unless you are one of the 0.33% of the population that has hereditary hemochromatosis. Even in that case you could still eat some meat without much problems especially if you balance iron absorption with calcium. Those with HFE can also consider iron chelation therapy, bentonite clay or phlebotomy to get iron levels under control.
Slamming vitamin C can increase oxalate production inside the body, important to remember that as part of a healthy diet the body only needs max 250mg of vitamin C daily and it is not required to go beyond this to keep oxidation in the body under control. Even those eating the standard american diet probably dont need more than 500mg, I don't recommend either. The body balances pro-oxidation and anti-oxidation that is why it is important not to megadose vitamins unless you've spoken with an expert and you have a well informed reason to do so.
A rare genetic disorder called primary hyperoxaluria occurring in less than 0.1% of the population leading the body to produce excess oxalic acid up to 600 mg a day from normal 50 mg a day due to a variation in a liver enzyme that is supposed to control and down regulate the body's production. This one is not responsible for many cases of kidney stones but it was still notable enough to include it as number 8 here on this list.