Fix windows search not working

I cannot use windows search from the task or the file window.

Spend much time in searching the solutions online and tried to fix the problem. However, most of them are not working for me.

Finally, I tried the following script in the Powershell with admin right:
Add-AppxPackage -Register "C:\Windows\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy\AppxManifest.xml" -DisableDevelopmentMode

The problem is solved!