I've had foamy urine for about 2 years now, and I've been pretty terrified. I'm talking proper foam, groups of bubbly streaks that don't dissipate, though the urine is a normal light yellow color. I've been taking vitamin supplements for a little over that time, and got worried that my kidneys may have been damaged as a result.
I told my doctor, and he didn't seem worried, and asked if I had blood in the urine as well or other symptoms, which I didn't.

After a recent blood test focused on kidney function, everything came back normal.

After doing a bit of research, it turns out only about a third of foamy urine cases are indicative of kidney issues.

The rest are largely unexplained, but I did read elsewhere that dehydration can cause it as well, by concentrating the very moderate amount of protein healthy kidneys naturally let into the urine; I did notice that when I drink more water (which I don't do enough, I only drink a bit when I'm thirsty), the foam vanishes.

And although kidney disease can be asymptomatic until critical, normally by the time you have foamy urine they say other obvious symptoms begin to manifest as well, such as high blood pressure, swelling, etc. Especially if the urine is darker as well.

So if you notice foamy urine without other symptoms, it's very unlikely that kidney issues are the cause