Short answer: Use books to learn topics and online mocks to learn strategy, and review both.
Books for topics
Topic-wise sets build fundamentals.
Mocks for strategy
Mocks teach question selection and timing.
Review
Review mistakes after each mock and revisit the topic in your book.
Frequently asked questions
Do I need both?
Most aspirants use both: books for topics and mocks for strategy.
Is a used practice book fine?
Yes if the pages are mostly unmarked.