A primary statistic or stat is the Character Attribute that a class is intended to focus on when selecting items and other attribute bonuses in Diablo III or Diablo Immortal. In a general context, "primary stats" refers to any/all of the three primary stats. The remaining "core stat" is Vitality (except in Diablo Immortal), which is not a primary stat for any class.
Early games[]
Diablo and Diablo II do not have designated primary stats. Many attributes are most influential in their role filling requirements - for items, and for spells in the first game - not their direct combat impact. In Diablo II especially, Energy simply increases mana, rather than directly increasing combat effectiveness, so many spellcasting characters actually have Strength as their highest non-Vitality stat.
Diablo III[]
In Diablo III, each class has one of three primary stats: Strength (Barbarian, Crusader), Dexterity (Demon Hunter, Monk), or Intelligence (Necromancer, Witch Doctor, Wizard). Each of these grants defensive bonuses to all classes (Armor or Resistances), but grants a direct 1% increased damage per attribute point to characters for whom it is a primary stat.
The Smart Loot system causes most items dropped for a character to have primary stat bonuses matching their class, although items with no primary stat bonus appear as well. It is impossible for an item to have two random attributes that improve different primary stats. When a primary stat and a specific class skill are boosted by the same item, the two will always match.
Crafting options like Enchanting or Kanai's Cube recipes never give a primary stat meant for a different class from the current character. Enchanting can be used to replace a non-matching primary stat with the one matching the current character, but it cannot be used to add a second primary stat to an item. Paragon Points can improve the primary stat and Vitality, but no other core stats.
Diablo IV[]
Diablo IV has a stat for each class that directly increases damage like in the previous game, but each class also has additional core stats that provides other benefits, increasing the diversity of the attribute mix desired by different classes. The latter attributes could be called primary stats as well, or secondary stats, although this should be distinguished from the non-core stats which are also called secondary stats.