FACT: Despite the alleged fact, US had 23/24 BBs in WWII.
Battleships had a role. Aircraft have a role. In the near future, space based weapons and non-kinetic weapons will have a role.
But being able to shoot a huge 3 projectiles 20 miles with decent accuracy certainly had an impact. (Pun intended)
Four of the WWII battleships were the fast Iowa class ships that could keep up with Essex class fast carriers.
Six others were 1940s era but slower. The rest had been built prior to 1923, one dating back to 1909.