Nitrofurantoin is a commonly used antibiotic for UTIs in pregnancy, so a prescribed course like this is generally fine.
Next Steps
Since you're at 35 weeks, confirm with your prescribing doctor that they've factored in how close you are to delivery, as antibiotic choice can shift near the end. Finish the full course even if you feel better early.
Health Tips
If burning, urgency, or fever don't improve in a couple of days, or you notice reduced baby movements, contact your doctor promptly.