Mirabegron is a standard medicine doctors prescribe for an overactive bladder, which causes the urge to pass urine again and again even when the bladder isn't full. It works by relaxing the bladder muscle, so it's generally a safe and appropriate choice for what you've described.
Next Steps
Keep taking it as your doctor advised and give it a few weeks, since it usually takes time to show full benefit. If you notice burning, fever or blood in the urine along with the frequency, get a urine test done to rule out an infection.
Health Tips
Mention any history of high blood pressure or heart issues to your prescribing doctor before continuing, since this medicine needs caution in those cases. Please see your gynaecologist or physician if the urgency doesn't improve.