Do not treat at home. It could be a UTI, but even then, you need the correct antibiotic for the specific bacteria causing it. Only a lab test can tell you that.
If you treat at home with an antibiotic, and it's not a UTI, the antibiotics you take can mess up test results for a few weeks after, making it hard to determine what it is you have.
It could be an STD - gonorrhea, chlamydia or NGU, or a UTI. The only way to know is to test.
Feel better soon!
Get treated for all STD’s, this included mycoplasma genitalium. Be sure to be off of antibiotics for at least 3 weeks and use first void urine.