In D&D 5e, When an Intellect Devourer consumes the brain of a 3rd-level fighter, for instance, can it continue to gain fighter levels?
Or due to its monstrous nature, is it locked to that 3rd-level state?
If you're asking about Intellect Devourers in D&D 5e, then when it uses its Body Thief ability it gains the ability to use all of the target's statistics with the exception of its Intelligence, Wisdom, and Charisma scores. This includes the abilities of the 3rd-level fighter.
The Intellect Devourer is a Monster, however, not a player character. Generally Monsters don't have character classes unless the DM is using the "Monsters with classes" rules from the Dungeon Master's Workshop in the DMG.
At that point, if the DM wants to have the Monster begin to gain class levels it seems like it would be logical to assign future levels in light of the Monster already having abilities equivalent to a character having three fighter levels (i.e., on level up have the monster acquire the abilities of a 4th level fighter). This prevents the Monster from getting the benefits of a 1st-level fighter twice, something that isn't available to PCs.