A seat set too low or a gear set too hard ends most first rides early. Both feel like a fitness problem. Neither is.
Your first day
Starting takes fifteen minutes of riding on flat ground, plus a few minutes of checks first.
Put on a helmet and squeeze both brake levers to confirm they stop the wheel. Check tire pressure against the number printed on the tire's sidewall, using a pump with a gauge. Adjust the seat so your knee keeps only a slight bend at the bottom of the pedal stroke, higher than feels natural, though you should still reach the ground with your tiptoes when stopped. Ride flat, quiet streets in an easy gear (the lowest number on the shifter) for the full fifteen minutes, staying seated the whole time, no standing sprints yet.
Most beginners set the seat too low out of nerves about falling, and a seat set too low usually leaves the knees aching after a few rides. It should feel slightly too high before it's actually right.
You're done when you've ridden the full fifteen minutes seated, with no knee ache and no gasping.
The thing most people miss
It's tempting to ride in a hard gear because resistance feels like progress. But a hard gear makes each pedal stroke a heavy effort, so your legs tire early. Shifting down and pedalling faster spreads the same work across many lighter strokes, so you can keep going.
The bike's gears exist to do exactly this, and using them well is a skill, not a shortcut.
What not to buy
Don't buy clip-in pedals or padded shorts before the first few rides happen. Neither fixes anything about early exhaustion, and both are easier to choose well once an actual riding habit exists to fit them to.
Cadence, how many times your pedals turn each minute, is what shifting controls. Aim for a pace where you could still talk, and shift down before a hill and not halfway up it. Learning to make that change before your legs complain is worth practising on purpose.