According to the NOAA National Severe Storms Laboratory:

Hailstones are formed when raindrops are carried upward by thunderstorm updrafts into extremely cold areas of the atmosphere and freeze. Hailstones then grow by colliding with liquid water drops that freeze onto the hailstone’s surface. If the water freezes instantaneously when colliding with the hailstone, cloudy ice will form as air bubbles will be trapped in the newly formed ice. However, if the water freezes slowly, the air bubbles can escape and the new ice will be clear. The hail falls when the thunderstorm’s updraft can no longer support the weight of the hailstone, which can occur if the stone becomes large enough or the updraft weakens.

The Australian Government Bureau of Meteorology provides this helpful diagram to explain the hail formation process:

Wintry precipitation on the other hand, like snow, sleet, or freezing rain, does not require updrafts and thunderstorms to form (if I understand correctly). Take snow, for example:

Snow forms when tiny ice crystals in clouds stick together to become snowflakes. If enough crystals stick together, they’ll become heavy enough to fall to the ground.

Snowflakes that descend through moist air that is slightly warmer than 0 °C will melt around the edges and stick together to produce big flakes. Snowflakes that fall through cold, dry air produce powdery snow that does not stick together.

Snow is formed when temperatures are low and there is moisture in the atmosphere in the form of tiny ice crystals.

Here is a chart from that shows how various types of wintry precipitation form:

Thunderstorms are rarely associated with wintry precipitation events, but it is not unheard of for “thundersnow” storms to occur.