Where was Stan Lee in Logan?
The X-men franchise, of which Logan is part of, is owned not by Marvel Studios but by 20th Century Fox. Afaik Stan Lee has not appeared in any X-Men movie.
A few guesses why:
Fox studios does not want Stan Lee in their marvel movies for whatever reason (maybe they think his cameos would add unnecessary levity, especially to a serious movie like Logan)
Stan Lee does not want to be in Fox's movies
There's some contractual issue that means Stan can't be in those movies.
Also, I vaguely recall (so likely am wrong) a few years ago reading that Stan would only appear in movies of characters he had created. Wolverine was created by Len Wein and John Romita sr.