Your question is not difficult................You were outplayed. The only way to change this from happening again is to KNOW your opponent. The cards DON"T matter. The size of your stack, tolerance for losing it, size of your bet vs opponent's stack, and position all contribute to the dynamix.
A paragraph, page or bok won't help........... only experience.
Good, luck