This is likely to be a urinary infection.
See a doctor, they'll advice a urine test to confirm the infection also a culture test to choose the right antibiotics.
The possible causes of infections include less water intake, dirty toilets especially public, new onset sexual activity, some conditions which compromise immunity e.g.
diabetes,
kidney stoens.
People with severe infection involing kidneys, recurrent infections, pre-existing illnesses need specialist care.
Water intake, cranberry juice, healthy habits and genital hygiene are protective.