They did a prenatal ultrasound, and they told me that my baby has water in the kidneys. Is that very serious?

Mostly not serious. Most cases of prenatally diagnosed fetal hydronephrosis (water/urine in kidney) are benign. Depends upon how much fluid present 11 millimeters diameter of fetal kidney pelvis or less is usually fine. 25mm or more before birth may well require treatment after birth. Suggest consult with pediatric urologist, and provide details most babies will never require any treatment after birth. Good luck.