In the long term financing can have a significant cost advantage. The longer you own that same vehicle the more considerable that advantage becomes. The risk of unexpectedly higher than average maintenance costs or a total loss of a vehicle through an accident or damage however can mitigate that advantage.
This shows that should you want a new vehicle every couple of years, or expect that your vehicle needs will change in the near future that a lease is likely to be the more cost-effective option.
If you don't expect your needs or vehicle to change in the next 3-5 years the costs of either a leasing or financing are comparative and is up to your personal preference to decide which option best matches your life.
If you plan to drive your vehicle for more than 5 years or until it can no longer be driven then financing becomes the more cost-effective option with the value increasing dependent on how long after your payments end that your vehicle is able to continue being safely driven before maintenance costs outweigh the benefits of acquiring a new vehicle.