Do you violate copyright every time you remember a fact you learned from a book in school? Does watching Bob Ross videos mean every landscape painting you create violate copyright? Does visualizing the periodic table of elements in your head mean you're violating the copyright of the creator of the poster you remember?
Copyright means you cannot take the original and reproduce it exactly. Using it for derivative works is allowed, otherwise the first person to draw a horse would claim copyright for all horse images. Using a book to learn the style of an artist (Sarah Silverman, George Carlin, Arnold Schwarzenegger) and creating new works that resemble something the artist might say, or emulating their cadence and timing, should be allowed as long as the work is not pretending to be originals by them.
The fact that ChatGPT read the books and learned something from them does not mean the ideas or concepts are copyrighted.
TL;DR
Learning - good
Plagiarizing - bad