Songwriters definitely have a future, but one in which they can't make a living from their art.
Before AI, only a few could, and their numbers will drop dramatically.

But that's not the end of the world, it just means that the technical elements of music become less important and ideas, creativity, imagination and fantasy take center stage.
Songwriters are being put more in the role of a producer.

And when the final power goes out, there's always someone who still knows how to play a sing along song on an acoustic around the campfire.