I had a similar experience last May when I went to a trail centre with my brother who has been riding for years, I didn’t spew but came very close and really didn’t enjoy it. I went back again a month later with a mate who hardly rode and he blitzed me too which was pretty embarrassing and gave me the kick up the arse to get fit.
Since then I’ve rode 1,500km on my mountain bike, which is my only bike, mostly on the road a few evenings a week including all through the winter and getting out on the trails a couple of times a month which unfortunately is all I have time for. I’m still improving but I can now do big rides without struggling too much so am able to enjoy the whole thing which has been my motivation getting out through the week when the weather is grim.
Get out and ride as much as you can as hard as you can and find a big hill and ride up and down that until your legs and lungs are about to explode.