It is also worth pointing out, that at least for math textbooks, there is never an expectation that a student should solve all the exercises. If you solve those that do have a solution, then you will hopefully still have a good experience and learn lots.
I don't think I'm alone here when I say I frequently gain understanding of things by writing code to model them. I know I understand something when I can write it in code. So after ingesting the lesson about a topic I'll see if I can write code to do what I just learned. I have spent a lot of hours stuck at a juncture of not being entirely sure my code, which works on the simple examples, is also working in the complex ones. The difference in results may not be evident. Am I troubleshooting my understanding or my code? I need a known result to actually know.
This is one place being able to copy something from your textbook, for example, paste it into ChatGPT and ask questions is a huge benefit. ChatGippity doesn't always get it right but usually the interchange is much more useful than being stuck.
Of course this all depends on the type of exercise. For some, you can easily check the answer yourself after you have found a solution.
Also, in the real world, most assignments don't have an answer either, and it seems like a good idea to be prepared for that.