Quoting TV tropes (always fun).
If a character has been written out, but future plotlines depend on their continued existence, that is an example of the Chuck Cunningham Syndrome trope.
If that character is missing (intentionally) to further a plotline, then that's an example of the Chekhov M.I.A. trope.
And finally, if a main character is simply not in the episode, it's most likely a result of an Absentee Actor:
The reason usually has something to do with Real Life. Maybe the actor
is sick or otherwise unavailable — but not so unavailable that the
writers have to drop a bridge on them or put them on a round trip bus.
Maybe the producers need to save money and can't afford to pay them
for the episode (hey, every penny saved goes to pay for that big
CGI-laden Season Finale!) - in fact, some actors' contracts restrict
them to appearing in only a certain number of episodes each season.
After all, you get days off work - sometimes actors do, too! Maybe
there was just nothing for the character to do that episode. If it's a
Lower-Deck Episode then it could easily be said the character was just
doing something else that day, but usually explanations for the
absence given in show are way too flimsy to explain a total absence —
just how unavailable can Captain Picard be if he's at the hair salon
for this week's crisis?