It's automatic, but some options of what is indexed can be changed by the user. Since indexing is such an important function, I feel default is best. Most of MS articles are hard to decipher but the one on indexing explains it well. Search indexing in Windows 10: FAQ - Microsoft Support