Delta has an interesting article about the elemental damage types in OD&D and their associated colors.
OD&D ostentatively only had four damage types accessible to players: fire, cold, lightning and physical (weapons). Poison was just save or die. Monsters had more: green dragons did chlorine gas damage insted of poison (essentially acid), black dragons acid damage. And even players also could deal "air" damage through summoned air elementals, or "earth" damage through summoned earth elementals. Later in Greyhawk players got acid damage with Melf's Acid Arrow. Magic Missile from Greyhawk originally was untyped.
I find it amusing that OD&D found space for a table of +/- 1 modifiers to hit and damage against dragons by damage type, which may tell us a bit more about what opposes what, but which seems an odd choice given the modifiers are so small. (Aside: I also find the subdual rules mystifying -- why would anyone ever not opt for subdual? You very likely end the fight quicker than if you have to kill the dragon by removing all of his hp, plus you get your own personal dragon in the deal, too. There seems to be no downside for subdual?)
In later editions, all the different bludgeoning attacks no matter what caused them were just physical bludgeoning damage. Magic Missile was redefined to "force" damage. Nowadays there is a much larger list of standard damage types in the game. If you take resistances and immunities into account, anything can be a damage type. Some devils can only be hit by magic or cold iron? Now iron is a type. A fey is immune to wooden weapons? Now wood is a type. Even without such shenanigans, the list of types now is quite long. For many of them, it would be difficult to assign an "element" type for the kinds of elements that have been thought of as building blocks in ancient systems.
- Physical (Slashing/Piercing/Bludgeoning)
- Silver (Slashing/Piercing/Bludgeoning)
- Magical (Slashing/Piercing/Bludgeoning)
- Poison - Wood
- Fire - Fire
- Lightning - Metal
- Cold - Water
- Acid - Earth
- Thunder - Air
- Psychic - Soul / Creature
- Necrotic - Undead
- Radiant - Holy
- Force - Magic