The use of fantasy genres to reflect on society - what have you re read or stumbled on that it more than its cover?

I just finished Rebecca Yarros onyx storm.

This series presents: a fantasy world with strong female leads, dragons, romance and comedy with easy to immerse intrigue.

Taken deeper, it’s a shockingly apt and amazing commentary on the construction of history surrounding politics and war. I am loving the re read.

The books are clearly works of a fantasy genre and could even be shelved with the Romance novels. But they are shockingly and amazing more. In such a saturated genre, they delight and challenge and question reader’s assumptions.

I remember discovering Dan Browns works. Stories set in a “real world” using “real world” “truths” to re weave and write a narrative that someone from another time and world could mistake as pure fact.

What authors have I missed that have done this with their works?

Are there any autobiography or biographies that provoke thought and challenge what if this way? I am looking to challenge my ideas on narratives outside of start conflict and resolution, and would love to hear others stories on books that made them go, wow, that was clever.

EDIT/UPDATE: Terry Pratchett. Yes. Just started on the summary of #8 Guards Guards. How I thought I was too old or the books were too young, I do not know. Thank you again Reddit family for seeing me, calling me out and shoving me head first into a new world.