If you are not looking to randomly pick questions, you can manually add questions to a quiz from any quiz category that you have rights to use. Just pick "Add", then "from question bank." Some of this language will depend upon your version of Moodle, but I think this language has been around at least since Moodle 3.
Likewise, if you want to randomly pick questions from each specific category and put them into a quiz, follow the same procedure but pick "a random question."
It gets a little trickier if you want to pick questions from either of the two categories. For this, create a category, then put the question categories indented from this (major) category heading. When telling the quiz engine where to add random questions, pick the heading.
All questions quiz category heading
Questions from book 1, chapter 1
Questions from book 2, chapter 1