I will be contrarian and say "Yes...do them all".
Of course someone could arbitrarily double the problems in a text. Or have a problem that is unsolvable. Or say what if I did 399 of 400 problems--is all lost versus doing 400 of 400? But these are nitpicking exceptions--you want to know a practical guide in spirit: (a) do all the problems or (b) do the teacher issued and much smaller subsection of problems.
Jaime Escalante (teacher in Stand and Deliver who got 70+ AP BC passing students from a ghetto LA school in the 80s!) thought problem volume was key factor. He even assigned extra volume above the text. "Miles build champions".
Note, that an obvious disadvantage of doing more problems is time, but it is also true that with problem volume, your facility and speed increases. This is a well known training effect. In many intellectual and physical trainings. If the problems become repetitive, than it is drill. But drill goes fastr. And drill has a benefit--we are not computers to get an algorithm once and know it forever. There is "muscle memory" in piano.
It also becomes less likely that you fool yourself into thinking you know what you don't, if you do them all rather than saying "got it".
In addition, you are less likely to omit a particular trick or the like. Consider that authors may differ in how much the cover different things. One may only have one problem with Chebychev polynomials or Bessel Equation. A competitor may have several or a whole small section of the written text plus many problems. If you do all problems with the ODE text that only has one of the CP or BE problems, you at least cover it once. If you skip around, may miss it. And good luck deducting it at the time, first time, under exam pressure, with zero pre-exposure!
[You may even want to consider if your book lacks problems of a certain type. It may lack some easier problems to get familiarity. Professors and advanced classes love more difficult or project-ish problems, especially when having graded, non-drill type homework in college. But you actually get a pedagogical benefit from plug and chug drill that may be lacking if the problems are all to intricate. Also, easy problems ease you in and make the harder ones not as hard. The converse can also be true that you lack enough hard problems. Or you may be lacking problems that are word problems or that are not word problems or that cover a specific area (e.g. calc book might skimp on related rates). But again this is a caveat. In general, especially for books that sell a lot, they will have ample problems and you will get what you need by working them all.]
Also note that if you are weak in algebra (or not even weak, but just not clockwork-like accurate) that doing lots of calc problems gives practice in the algebra as well as the differentiation and integration techniques your practice. Same is true into the higher and higher level subjects.
A few practical stories of people who worked all the problems and got the benefit:
Freeman Dyson worked all the ODE problems in an ODE book over winter break, teaching himself the subject. He enjoyed it and benefited from it. (Is a video on YT of him talking about it.)
Dick Feynman felt he needed to learn classical E&M better when developing QED. He worked every problem in a conventional E&M text. He also worked every problem in calc texts and in quantum theory.
Lars Onsanger did all the problems in Whitacker and Watson.
I worked every problem in 1980s AP calculus and chemistry texts. And crushed the APs and college entrance exams. Doing better than students with higher IQs. [And I am nothing like the gods in 1-3, but would make a strong case that both for mortals and gods, there is a benefit from doing all the problems.] It really was not that bad in time...just went fast and intense every night. It was also a beautiful feeling, that feeling of mastery. Very different from courses with a B or C or even a low A. That A+ feeling where you have made it your b#$*&. Courses stuck with me for decades and were useful even after leaving business world and going back to academia later in life. Courses where I did not not do all the problems didn't give that feeling at the time or stick with me for years.