Frequently urinating can be caused by T2 diabetes. The Q and A section maybe useful.
I discussed that with my doctor and was given a prescription. Works miracles... Oxybutynin.
Possibly uncontrolled dm does that, if you are frequently urinating, it also could mean it's not controlled, that is accompanied by a weight loss as the protein is lost
Start with your Doctor
There are a few possible causes and you won't know where to start until you nail down what the cause is