A painful ulcer on the labia minora that worsens with urine or contact can come from a few causes, ranging from a simple friction sore to a viral infection such as herpes. The pattern you describe, burning with urine and pain even at rest, makes it worth getting looked at rather than guessing, since the right care depends on which one this actually is.
Next Steps
Until you can get examined, keep the area clean and dry, wear loose cotton underwear, and pour water over it while you urinate to cut the burning. A warm sitz bath for 10 minutes twice a day helps. Please see a gynaecologist in the next day or two even if it feels bearable.
Health Tips
Avoid soap or scented washes there, and don't apply any cream without a doctor checking first, since the wrong product can mask what it actually is.