Your in luck, I have done a lot of research on this topic.
The answer isn't that Buying or Leasing is better -- because what it really comes down to is 1. What deal you can get (either buying or leasing), 2. Are you the type of person that will be willing to buy and hold on to a car until it dies or would you be likely to upgrade in 5-7 years? and most importantly 3. What brand car do you want to buy? (this is the key because some brands lease REALLY well - its all based on how much they depreciate)
Example --
I have a growing family. We are considering a Third kid in a few years but didn't want to lock into a a huge 3 -rower "just in case" . It seemed like leasing a car for 3 years and then reassessing our family needs when the lease runs up made the most sense to us. So --what should you lease? The answer is, which cars will most likely to keep their value (think honda, toyota, etc)? Dealerships do the math based on how much they will be able to sell the car for once your lease is up. If you buy a VW Atlas for example -- it depreciates significantly faster then say a highlander or a pilot. Therefore an Atlas lease wouldn't be worth the cost for you or the dealership.
We landed on a Toyato rav4. Our lease payments are WAY lower then they would be if we bought them. The total of our payments over 3 years is almost equal to the amount the car would automatically depreciate if you had bought it AND I have equity (yes, equity in a LEASE). Because I negotiated the Buy-Out price when I leased it, so my buy out price is Lower then I could sell it for when my lease is up. My plan is to buy it from the dealership and then sell it for more on carvana.
here is a link of cars you should lease vs buy
https://www.realcartips.com/news/1384-better-to-lease-than-buy.shtml