You have to pirate textbooks. It is OK for a poor street dog from a third-world like me, it will be ok for you.
Basically, you have to search github (lots of other guys store their books there) and use Libgen or similar sites. Again, once you are NOT a privileged US/EU citizen from an upper-middle class family (who could afford $100+ books), it is ok.
Also I am absolutely and principally against charging tens of dollars for a result of
Basically, there is the only way. You download a book, lets say, Programming Principle and Practices Using C++, set up a C++ compiler, Emacs (with cc-mode, lsp-mode and pdf-tools. Start
Emacs split the window vertically, load the
.cpp file in the right half and just type everything you see in. Every. Single. Line. Of. Code.
If you do this for at least two hours every day it would take about three months to get through the book. But you will not forget everything six months later. The mechanical skills will stay forever.
This is how to learn by doing. It is like learning of playing a violin - you just mechanically do what is supposed to be done. Chapter after chapter. Books after book.
One day, perhaps years later, the quantity-quality leap will occur. You will acquire proper new habits.