Programming: Principles and Practice is good, however I am not sure I'd suggest it to a beginner. (I had some programming background when reading it. Also there's some wishful thinking - for example he tried to discuss concepts in 2014, when they only made their way into standard in 2020 and compilers do not completely support them yet - but hopefully it will change in next few months).
If you want something easier and interested in games - take a look at C++20 for lazy programmers. It uses SDL behind the scenes, and sort of game oriented. It also teaches some modern C++ concepts later in the book. You can can read it alongside "Programming: Principles and Practice" and "C++ Primer" if you want. After you are done with it, go with The fundametnatls of C/C++ game programming by Brian Beuken (Emulates console game development targeting by targeting raspberry pi, however it uses paid Visual GDB which is a downside( and/or Game programming in C++ making 3d games. They will help you to get started with game programming and move you from being complete beginner.