In a wok, fry onion, chilies, and garlic in hot oil until dark golden brown.
Separately, using mortar and pestle, crush cashew nuts and mix with sugar, lime juice, miso, and two types of soy sauces. Add fried shallot, garlic, and chilies into the mortar and mix thoroughly. Balance the heat with sriracha.
Soak rice in cold water for 30 minutes.
Strain soaked rice. Add fresh cold water and bring to a boil. Stir, reduce the heat to minimum, cover, and cook for 15 min. Turn off the heat and keep covered (for steaming) for another 15 min.
In a medium saucepan, bring water to a gentle boil over medium heat. Smash the lower part of the lemongrass stalk, slice galangal, remove the stem and cut kaffir lime leaf. Add them to the simmering water to infuse it with their flavors.
Peel and cut the squash to bite-size pieces, remove the roots and wash breech mushrooms. Add vegetables to the liquid.
Stir in nam prik pao. Use the vegetarian recipe above for a strictly vegetarian diet. Season the soup with salt, lime juice, and chilies. Balance the taste.
Stir in the cilantro leaves and serve the soup piping hot with rice.