In most wars in recent history you have one side with lots of relatively high tech weaponry going against guerrilla forces fighting with relatively unsophisticated stuff but hiding among civilians, thus making the use of all that high tech weaponry a bit controversial. E.g. Syria is a good example of that.
WW II was probably the last conflict where all sides basically removed the gloves and fought with everything they had where everything on both sides included some very scary options. I live in what got rebuilt after WW II destroyed Berlin. There wasn't much left here. Other cities got it worse.
Tanks still have a role because in most conflicts, the other side would lack the means to defend against them. But they'd be relatively useless against someone with rockets & an airforce. But they are awesome for dominating a chaotic battlefield without that. Basically, in the Gulf wars, the US took out the iraqi airforce in no time and after that basically tanks rolled in pretty much without opposition. I don't think any US tanks were lost at all. Much of the conventional troops ended up surrendering.