Difference between the words "betrayal" and "treachery"
"Betrayal" implies that there was some sort of loyalty due in the first place, and that this loyalty was violated. "Treachery" simply implies malicious deception, even in the absence of cause for loyalty.
According to Lexico:
betrayal: The action of betraying one's country, a group, or a person; treachery.
betray: Expose (one's country, a group, or a person) to danger by treacherously giving information to an enemy.
treachery: Betrayal of trust; deceptive action or nature.
From the definition of betrayal, it follows that one can use always use treachery in place of betrayal, but one cannot always use betrayal in place of the second meaning of treachery: deceptive action or nature. The meaning of treachery is broader than that of betrayal. See the example sentences provided by Lexico.