Not a lot of advice can be given until you narrow down your preferences and limitations, and decide what type of RV you want to be seen in.
Asking new vs used is like asking Ford vs Chevy. You'll get 50/50 answers.
If you're not mechanically inclined or don't want a lot of projects and go used then think trailer behind a pickup so you don't have to deal with a RV drivetrain, IMO.
IMO, age is much less of a consideration (within reason), than condition and use. Looking at rvs that are years old, if stored outside year round, especially uncovered, is a bad thing. Plenty of gently used ones that haven't been beat on by the elements. $40k will buy you a very nice used small A gasser, C, or a TT and a decent truck to pull it. Just gotta decide, but sounds like you're just in the hypothetical stage anyway.
2016 Ram 2500, MotorOps.ca EFIlive tuned, 5” turbo back, 6" lift on 37s
2017 Heartland Torque T29 - Sold.
Couple of Arctic Fox TCs - Sold