Spider-Man: Far From Home filmed from last July to October in England, New York and several other countries.
Stan Lee wasn’t able to travel much in his final years, but as with his other recent cameos, presumably it would have been easy enough to get him to a movie set in California where he could shoot something quick for Far From Home.
Nothing’s official yet, but I’m guessing that it’s likelier than not that Lee will have some presence in the next live action Spider-Man movie, whether it’s on screen like all his other past MCU contributions or if he was only able to record a vocal cameo, like what he did for last December’s Spider-Man: Into the Spider-Verse, where he played a shopkeeper who interacted with Miles Morales.