The next film in the Marvel Cinematic Universe will be Captain Marvel in March. It'll be heartbreaking to see "In loving memory of Stan Lee" (or something along those lines) at the end of the film.
The last film in which he'll have a cameo will likely be Spiderman: Far From Home in July, which wrapped filming in October. Unless they show his cameo character in Avengers 4 having disintegrated or passed on in another way.
Someone drew the parallel that after Avengers 4, a new era of Marvel is starting (with the originals leaving the MCU). Stan Lee's era ends at the same time.
There have been some incredibly beautiful tributes to Stan and his genius. He will be missed.