Whether the book is physical or online, there are ways to search within the book to find the specific information you need.
Sometimes referred to as Contents, it is usually found at the beginning of a book. It will display the titles of each chapter and the page where that chapter begins. Sometimes you see either your topic or the broader subject areas of the topic you need in the table of contents.
Usually found at the end of a book, this is a list of words or phrases for topics covered within the book. The list is displayed in alphabetical order and sometimes provides prompts to see synonyms in the same list. Each topic provides page numbers where that topic has been discussed within the book.
Most ebooks provide a search function where you can search for words or phrase within that book. The results may be displayed by relevance (i.e. the pages/chapters where that word appears the most will be higher up the list) or numerical order (i.e. pages are displayed in order by page number).