Hi @Sayantan Ganguly ,
To use the search query in CSOM PowerShell, you need to load the Microsoft.SharePoint.Client.Search.dll assembly. The error you are seeing indicates that the assembly is not loaded. You can load the assembly using the Add-Type cmdlet as shown below:
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Search.dll"
In other words, add the above statement to the code you provide.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.