How hard it is depends on what language you're learning. If you actually want a career in coding, you'll probably need to learn one of the harder languages like C/C++, or C# or Java (easier than C/C++, but you still have to implement your own algorithms).
Glue languages like Python and shell scripting can be automated by AI, since cobbling together pre-written functions is straightforward enough for a computer program to do it. Also, web applications where you're mostly doing CRUD operations (CRUD is an acronym for Create, Read, Update, Delete) can be done with AI using vibe coding, again, because CRUD apps are fairly straightforward and the steps are self-contained, so there's more or less a one-to-one mapping from English prompt instructions onto CRUD operations.
If you want an actual career in programming that won't be replaced by AI, you'll have to challenge yourself by learning algorithm design. If you want to really go all-out, learn something like graphics card programming or how to write device drivers. No matter how advanced AI gets, it will never be able to do that stuff.
_________________
Lunatics are good at thinking outside the box.
-- TJ Kirk
My Music