A kidney infection is a serious problem that requires strong antibiotics. Cranberry juice or pills are to create an acid environment to prevent bladder infection which is much more common and More common in girls. The reason is they have shorter urethras, the tube from the bladder to the outside where urine travels. Bubble baths should be discouraged.
Not drinking enough water causes kidney infections. And yes cranberry juice can help a little, but you should really drink more water. Divide your body weight in half and that's how many ounces of water a day your body needs.