So many possible problems. Is the saddle at the proper height? A saddle too low will cause you to expend more energy & wear out faster. Sorry...I have to use links. See 1st video link below. With a pedal in the down (6 o'clock) position, there should be a slight bend in the knee with the ball of your foot on the pedal.
Are you shifting into the right gear at the right time? By pedaling in a gear that is too high, you are "pushing" or mashing down on the pedals. By "spinning" you pedal at a rate or "cadence" of 70 to 90 rpm & can last much longer without fatigue. So, if it feels tight in the thighs or any part of your legs...downshift.
Tire pressure...inflate your tires close to or possibly even at the maximum recommended pressure stamped on the sidewall. If it feels too rough, drop a few pounds of air out. But never go below the minimum rating. I always run mine about 5 to 10 lbs. below the max.
Your level of fitness now. If you haven't ridden a bike in a while, it will take a while to build that endurance back up. Start slowly & build each week on what you can do.