The Player's Handbook states that "The DM might call for an Intelligence check when you try to accomplish tasks like [...] Pull together a disguise to pass as a city guard." However, it's unclear to me which skill or ability I should use for an NPC who sees the player wearing the disguise might use (either for an active roll as an opposed check, or for a passive score to set a DC).
Intelligence (Investigation) or Wisdom (Perception) may be used to discern disguises.
I looked for examples in the rules where an ability check is used to detect a disguise. In the spell disguise self, we see:
To discern that you are disguised, a creature can use its action to inspect your appearance and must succeed on an Intelligence (Investigation) check against your spell save DC.
The spell seeming works the same way. Additionally, hags have a feature called Illusory Appearance, that is contested via an Intelligence (Investigation) check:
Otherwise, a creature must take an action to visually inspect the illusion and succeed on a DC 20 Intelligence (Investigation) check to discern that the hag is disguised.
However, Wisdom (Perception) may also be called for, as seen in the adventure “The Stygian Gambit” from Keys to the Golden Vault:
Whenever a disguised character enters a situation where the disguise might be detected by an onlooker who takes more than a passing interest in the character, have the character make a Charisma (Deception) check. If the check’s total is higher than the passive Wisdom (Perception) score of the onlooker, the disguise does its job. If the check fails, the onlooker sees through the disguise and either alerts security or demands a small bribe (5 gp) to keep silent.