To stop your Mac from indexing, you can open Spotlight in System Preferences and uncheck the files under the Search Results section that you don't want Spotlight to index. And you can also add the locations where you want to prevent Spotlight from indexing and searching under the Privacy section, such as your Mac startup disk.