Coding develops cognitive skills, problem solving and analytical thinking (“computational thinking”). By introducing and developing these abilities from primary school onwards, we create the building blocks and thought processes necessary for robotics and AI. This is not about displacing traditional subjects but, rather, changing the emphasis. Coding can comfortably sit alongside other subjects, especially those with a creative slant, reinforcing the development of key skills through multiple channels.

Digital skills: Why coding should at the centre of the school curriculum | Tes
Coding certainly can develop cognitive skills, problem solving and analytical thinking. A lot of other things can too. I think it is difficult.
Any class will present a wide range of learners. Designing or adapting lessons to try and get as many of them in the right zone to develop these skills is tricky. If you don’t get this right coding is neither productive or fun.
The article notes:

. Coding can comfortably sit alongside other subjects, especially those with a creative slant, reinforcing the development of key skills through multiple channels.

I’ve certainly found that putting coding into a context can lead to more fun and success. By adding elements art or making to a coding project more pupils are involved in problem solving, collaboration and creativity.
A difficulty in managing this might be the perceive need to be an expert in several different areas. I’ve certainly found myself in situations where I’ve not be completely confident around some of these areas.
The article acknowledges that covid has had an effect:

It is a reasonable assumption that this immersion in IT and technology is preparing young people for a digital future and teaching them the skills they will need.

But we need pupils to be creators as well as users:

there is a largely unrecognised digital difference between the users of technology and the creators

I think there is also a gap around literacy and the problems that the mixing of commercial and educational interests in technology. A lot of the uptake in digital solutions lacks any questioning of the provides of these solutions.
This is something I am not very sure I’d know where to start with? Perhaps Coding is not ‘fun’, it’s technically and ethically complex:

In just a few years, understanding programming will be an indispensable part of active citizenship. The idea that coding offers an unproblematic path to social progress and personal enhancement works to the advantage of the growing techno-plutocracy that’s insulating itself behind its own technology.