Rice Cocoons are epic key items that you can obtain in Black Myth: Wukong and are described as offerings to the Silkworm Deity. You will need this resource to feed the Proto-Amourworm to unlock the Elder Amourworm Spirit and here is where you can find the location to get Rice Cocoons.
Black Myth Wukong – Where to Get Rice Cocoons and Proto-Amour Worms
When you defeat her and follow her into a hole, you can offer incense to activate the Upper Hollow shrine.
From here, keep exploring the location to find eggs and smash them. If you don't get them right away, equip a Shrine and try again.
You can also take a right from Webbed Hollow Cliff or Oblivion Keeper's Shrine and then a right again to see enough eggs you can crack to potentially find Rice Cocoons in Black Myth Wukong. Since you need at least 3 of them, this is the best location to farm them.