If a creature has been taken over by an Intellect Devourer, what happens when a Charm Person, Suggestion, or other similar spell is cast on it? Can it even be targeted with such spells?
The spell would fail to charm the creature, which is functionally only a body for the intellect devourer per its Body Thief trait:
If it wins the contest, the intellect devourer magically consumes the target’s brain, teleports into the target’s skull, and takes control of the target’s body.
The intellect devourer itself also cannot be targeted by spells and abilities:
While inside a creature, the intellect devourer has total cover against attacks and other effects originating outside its host that isn’t protected by protection from evil and good. (Monster Manual)