Hello,
It can be due to a urinary tract infection or urethritis. Drink plenty of water and consult a urologist to get oral antibiotics prescribed. If the symptoms persist then I suggest you an immediate urologist’s evaluation to check out these possibilities and confirm the diagnosis after investigations.
You may need a complete urine examination and urine culture for the confirmatory diagnosis.
I hope it helps. Take care and regards.
Is it possible I have a urinary tract infection or some kind of bladder infection?