I am looking for examplez. What constitutes a SAN check? Just saying they work like the other ability checks isn't helpful -- I know what an STR check dies, it tests a feat of strength. What feats of sanity are there? I don't get it conceptually, and, given how you keep providing an answer that is akin to "you just do it," I'm curious if you actualky have a better understanding of what SAN is used for.
The DMG has suggestions. Basically SAN operates as a 7th stat (like good old Comeliness), though they are vague about how you obtain a value for it (I believe just suggesting "rolling" - like so much in the 5E DMG it is profoundly half-arsed).
Basically you roll SAN as an ability check when you do things like decipher forbidden lore, understand the ravings of a madman, overcome your own madness, understand truly weird magic, etc. - you'd presumably be rolling it alone or with a skill (replacing the normal stat).
You roll SAN as a save when you see a Far Realm creature, when contacted telepathically by something alien, when a spell tries to make you go mad, when you enter a plane where alien physics apply, or when you have a save that involves taking Psychic damage.
Failed SAN ability checks have no consequence. Failed SAN saves "may" cause madness (short-term, long-term or indefinite). It's unclear what should influence the "may" or type of madness. If it's the latter two kinds you lose a point of SAN permanently.
So it's clearly not a horror mechanic in a conventional sense, but serves a role a bit more like SAN in CoC, of creating meta-edginess in the players. I also think the ability check usage is super-dumb - it should be REVERSED - i.e. the lower the SAN, the higher the bonus on ability checks involving it - that's what fits the material that has inspired it. Whereas for saves it should be harder to save as it gets lower. But that's just another example of the DMG half-arsing it.