Usually your lease company will allow you to extend the date you hand the car back by up to 3 months, sometimes even longer.
If you order a new car from the same lease company, they’ll sort all this for you.
If you order a new car from another company, just tell them when your current lease ends and they’ll get the new car to tally up.