A herpes sore wouldn't last this long. A syphilis sore might, though. A syphilis sore usually shows up at about 3 weeks, and lasts 3-6 weeks. It's round and painless.
You need to get a syphilis test, and let a doctor see this sore. Syphilis is easily cured with antibiotics, but it's really important that you get it treated if that's what you have.
It could also be a fungal infection, dermatitis, or a host of other things.
By 6 weeks, 70% of people test positive for herpes, and it goes up from there until 12 weeks, when it's conclusive. However, a herpes sore isn't going to last this long.
If you are in the US, and money is a concern, call your local health department, tell them you think you might have syphilis, and need testing. They will put you in touch with your local STD clinic. You can also go to a Planned Parenthood, which offers services on a sliding fee scale.
To find your local health department, google "your county and health department", like New York County Health Department" or "Dade County Health Department". You can also google your city and STD clinic, etc. Always call before you go to see if the address/hours are correct, or if any services are limited because of covid, or if masks are required, etc.
If you aren't in the US, you can still google your city and STD clinic to find the nearest one.
You can also go to an urgent care clinic or your regular doctor.
Let us know what happens.