Learning how to draw anatomy accurately is a long process and is something you’ll get more comfortable with the longer you practice it. I learned how to draw anatomy by practicing both from memory and studying reference images. I often switched between the two so that my style would be a mix of realistic and cartoony.
Unfortunately I can’t recommend any books for learning anatomy, since I never used these kinds of resources myself, but I definitely recommend doing gesture sketches from reference as a way to improve your anatomy skills! Speed sketches are a great way to learn: try to capture the overall shape and movement before going into detail, since this helps you to understand the overall shapes and proportions. My free resource pack, Loish’s Digital Art School, includes a gesture sketching challenge that comes with reference images and tips – this is a great place to start if you want to practice gestures!