Windows can certainly search inside the deep contents of files, especially text files like txt, docx, and other Office files. It can also (if you turn it on) even find specific words inside script, code, javascript, and other programming files.
If your search isn't working, perhaps you are searching inside a folder that is either not indexed (not yet or not going to be at all), or perhaps you need to turn on the options to "always search file names and contents" option. There's also an option to have Windows search perform a search across the entire hard drive instead of just "typical user locations" like Documents and Desktop. You can find that option in Settings / Privacy & Security / Searching Windows. Although if you turn that on, it will need to index the entire drive and you'll see that it tells you this will not be performed unless the PC is plugged in and stays awake long enough to finish.
I'm happy to help further to get search functional for you. Let me know your specific issue like what kind of file it is and I'll help out so your search works as it should. Or if you have trouble finding & using the settings to adjust how the search performs.