Well, for militaries it is important not to learn the wrong lesson based on a single conflict.
To understand how this works is, Let's examine the scenarios that we observed in Ukraine campaign.
when a Tank thrusting thoward a well prepared defensive position-
1. first, it has to go through minefield, it is likely there will be some losses from the mines unless you have combat engineering capability.
2. Even if combat engineers succesfully curves out a clear route through the minefield, it would be slim and restricted. And when advancing through it, you can garunteee that you will be spotted by enemy ISTAR, (UAS and forward observers)
And that will immediately bring artillery, which we saw countless times in this conflict. Today's Artillery equipped with digital fire control system has become like a giant sniper gun. (Accuracy is unprecedented)
3. Of course, with artillery there is that deadly loitering ammunition that is loitering around the battlefield.
4. And let us not forget about the army aviation. (Systems like Male UCAVs like TB-2 and Attack helicopters)
5. After that there is mounted and dismounted ATGMs waiting for you down the line.
Finally, if you can survive every other onslaught, then you might meet your actual nemesis. (Another enemy tank)
Here is a perfect example of how Russian army puts an entire highly capable Ukrainian Mech/armor company (mostly composed of western vehicles) out of commission without even engaging in tank to tank battle.
Tactical Lessons from the War in Ukraine. Sergio Miller analyses the failed Ukrainian advance at Orikhiv. What can we learn?
wavellroom.com
Here is an excellent article adequately addressing the whole debate.
It is premature to draw conclusions on the continued efficacy of tanks and armored formations based on recent conflicts. Tanks will continue to be a tremendous battlefield asset when employed properly.
www.armyupress.army.mil