So, litotes is a literary device used to emphasize a certain trait or idea through understatement or diminishment. The essence of litotes is that we deliberately speak of something as less significant than it actually is to create a special effect. This is the opposite of hyperbole, which exaggerates everything.
When someone says “not bad weather,” when in fact the day is simply perfect. Or “it was a bit difficult,” when they meant that it was a very challenging task.
Litotes in literature is a way to add depth or irony to the text. For example, when a detective in novels says: “This is not the biggest mystery I’ve faced,” although in reality the murder was very convoluted and hard to solve. This device helps convey the emotional state of the characters or create a certain mood in the reader.
In Shakespeare's works, you can find such a litotes: when Hamlet says “I am not much of a poet” to describe his feelings, although his monologues are among the most notable examples of poetic mastery. This emphasizes his modesty or irony.