It may not be that clear cut:
https://www.betternutrition.com/checkout/brewers-yeast-versus-nutritional-yeast
https://www.betternutrition.com/checkout/brewers-yeast-versus-nutritional-yeast
Brewer's yeast is traditionally a byproduct of the beer-making process, in which case it's cultivated on malted barley or other grains, which produces some bitterness. However, some brewer's yeasts are "primary grown," meaning they are cultivated specifically for use as a dietary supplement, and may be grown on the same types of media as nutritional yeast.