To unlock Spirit Transformations in "Black Myth: Wukong," you'll need to follow specific steps for each transformation, often involving defeating certain enemies or completing particular quests.
Defeating Enemies for Spirits
Spirits, which are essential for transformations, are dropped by defeating Yaoguai Chiefs and other significant enemies throughout the game. These spirits appear as blue flames which you can pick up after defeating the enemy.

Defeating Enemies for Spirits, image via Saber Interactive
Unlocking the Ability to Absorb Spirits
Initially, you might encounter spirits like the Wandering Wight before you can actually use them. To unlock the ability to absorb these spirits, you need to progress through the story until you meet a character who grants you this ability. This typically involves dialogue or a specific event where you're taught how to harness these spirits.
Specific Transformations
Dark Thunder (Horse Guai)
This involves completing a questline related to Ma Tianba, the Horse Guai. You need to rescue him in multiple chapters, culminating in a quest in Chapter 5 where you can unlock this transformation.

Dark Thunder (Horse Guai), image via Saber Interactive
Other Transformations
For transformations like the Fireblade Wolf or Poisonous Creature, you might need to defeat specific bosses or complete quests. For instance, defeating the Macaque Chief in Chapter Three or engaging with the Rat Guais for the Ashen Slumber transformation.

Fireblade Wolf or Poisonous Creature, image via Saber Interactive
Chapter Progression
Some transformations are tied to chapter progression or secret areas. For example, the Violet Hail transformation requires access to a Chapter Four secret area, where you defeat a boss named Daoist Mi.
Unique Quests and Bosses
Transformations like the Golden Lining involve completing a Loong questline, which includes defeating four secret Loong bosses across different chapters.
Using Transformations
Once unlocked, you can equip one transformation at a time, which changes your combat abilities significantly. Each transformation has unique traits, light and heavy attacks, and sometimes special abilities or spells.

Using Transformations, image via Saber Interactive
Final Thoughts
Remember, while these steps are based on general gameplay mechanics and information shared across platforms like X (formerly Twitter) and gaming guides, specific details might require in-game exploration or could be subject to updates or changes by the developers. Always keep an eye on official patches or community updates for the most current methods to unlock these transformations.