Most genre definitions grow organically out of musical history, so there are some genres, which outsiders mash together but which have completely different musical inspirations and history. 70s Punk and Hard Rock/Heavy Metal used both distorted guitars, but are completely different genres, and if you were to tell any 70s punk band that they played rock, they would just beat you up (and the other way around).
So, here is how I see it, roughly starting from the 70s with my favorite music. I'm not gonna talk about anything that I don't know anything about.
So roughly around the late 60s and early 70s, out of the harder blues and blues rock, there are two genres emerging, Hard Rock and Heavy Metal. Now, there is a lot of debate on a lot of bands of that time, wheather to count them as heavy metal or not, because the new term heavy metal was thrown around a lot then, and applied to bands like Thin Lizzy, Led Zeppelin, Deep Purple etc... In my opinion (just from internet and conversations with old school metal heads who were actually alive back then), the first real heavy metal album was the Black Sabbath debut album, and the essentiel bands from the era, who actually shaped the sound of heavy metal as a whole, were: Black Sabbath, Judas Priest, Motörhead. If you want to argue if a particular Thin Lizzy album was actually Heavy Metal or not, knock yourself out, but these 3 are undeniably the very fucking definition of Heavy Fucking Metal.
Sometimes, this ambiguous 70s era is also referred to as "Proto Metal".
1979/80: Start of the metal explosion in UK, with what we call now the "New Wave Of British Heavy Metal" (NWOBHM). Bands like Iron Maiden, Saxon, Angel Witch, Tygers Of Pan Tang, Venom, Mercyful Fate etc really define the sound of Heavy Metal (alongside the already mentioned 70s bands). If you describe the genre of a band as "Heavy Metal" or "Traditional Metal" or "Trad", I will expect a sound close to this era.
Then of course, Heavy Metal was spreading around the world fast. "Speed Metal" is a genre with many definitions, I would see it most of the time as a sub genre of Heavy Metal describing the fastest and most aggressive bands (or just albums), that are not quite Thrash yet, like early Accept, Venom debut, Mercyful Fate, Metal Church...
Early 80s in the US, birth of my two favorite genres of all time (and their fan base HATED each other with a passion): "Glam/Hair Metal" and "Thrash Metal".
Thrash Metal was of course defined by "The Big Four", Metallica, Slayer, Megadeth and Anthrax. It uses the "speed" of speed metal, more distortion, harder riffing (a lot of palm muted down strokes and gallops), less emphasis on melody and more emphasis on aggression, and overall, there are influences of Punk and Hardcore in this genre. Outside of the Big Four, shoutout to Exodus, Testament, Overkill, Flotsam and Jetsam, and of course "The Big Four of Teutonic Thrash Metal" (ie the founders of the german thrash metal scene): Sodom, Kreator, Destruction, Tankard.
Speaking of Europe and Germany, Speed Metal evolved in a more melodic (still fast and powerful) direction, called Power Metal, with bands like Helloween, Blind Guardian, Gamma Ray etc... In the US, Power Metal is also evolving, with bands like Manowar, Omen, Manilla Road... Some consider US Power Metal and EU Power Metal to be different genres entirely, because EUPM evolved into a more melodic and in the 90s also symphonic direction, while USPM was always more aggressive.
But back to the arch enemy of all Thrash Metal Fans of the 80s, Glam Metal. While I would not consider Van Halen to be actually Glam, they definitely were a big influence in what became the "Sunset strip sound", together with Quiet Riot, Mötley Crüe, Twisted Sister etc... Lots of Sex, Drugs, Rock'n'Roll and party, and a lot more girls in the scene. And Thrashers didn't like that one bit, they wanted "harder, faster, more aggressive, less mainstream).
Luckily, now in 2021 I don't have to participate in this silly war and can just enjoy both styles for what they are. Other favorites of mine are: Ratt, WASP, Y&T, Skid Row (some don't want to count them here, but deal with it, they were part of the scene), Bon Jovi, etc...
Back to the more aggressive side of metal: In the mid and late 80s, a more aggressive version of Thrash Metal is born, which eventually evolves into Death Metal. Possessed probably coined the term, but I would call Death the first real Death Metal band. Very deeply tuned guitars, looooooow growls, heavy fucking riffs and riffs and even more riffs... Check out Cannibal Corpse, Bolt Thrower, Obituary, Suffocation among others... And then there is the whole scandinavian branch, and it all evolves into douzens of sub genres, which are either all the same or completely unrelated depending on who you ask.
The other big extreme genre is Black Metal. The first wave of Black Metal (also known as Proto Black Metal) grew out of NWOBHM and Speed Metal, with bands like Venom and Bathory. But Black Metal really started in the early 90s with the 2nd Wave Of Black Metal, with Mayhem, Darkthrone, Burzum, Immortal etc... As opposed to Death Metal, the vocals are usually very harsh screams, there is very little attention payed to technicality (apart from tremolo picking everything), it is a very lo-fi sound overall. Oh yeah, and lots of blast beats.
Of course, the history of this period is deeply troubled. Check out the wikipedia article for details:
https://en.wikipedia.org/wiki/Early_Norwegian_black_metal_scene
But the very quick overview: Vocalist of Mayhem kills himself, another member of the scene commits murder, then a lot of wooden churches in norway are burned, then the guy behind Burzum (Neo Nazi, also former member of Mayhem) murders the guy behind Mayhem...
Honestly, while there is some Black Metal that I like, the tolerance for hateful ideologies up to straight up Neo Nazism in the Black Metal scene up TO THIS DAY is extremely off putting, and something that I have never seen to that extend in any other Metal scene... Or music scene in general.
Moving on, I'm a lot less interested in music genres developed after the mid 90s. Of course, in the early 90s we have the whole Seattle Grunge movement, we have crossover thrash (mixing 80s hardcore punk and thrash metal), we have stuff like Groove Metal (Pantera, Machine Head, later Sepultura, Soulfly), Industrial Metal, Gothic Metal, Alternative Metal, Nu Metal, Metalcore (mixing 90s hardcore and Death Metal, and then it just evolves as a genre beyond that), etc... And I didn't even mention all the progressive subgenres which I really don't just want to group together as Progressive Metal...
And yeah, all that is just a really quick and dirty overview of metal and directly related genres. For a real understanding, the only way is to listen to lots of bands and get a feeling for each genre and what defines them and distinguishes them from other genres.
This became a lot longer than I thought it would.