Your curl seems to have some syntax errors. Below is the correct curl for the example.
curl --request GET \
--url 'https://graph.microsoft.com/v1.0/me/drive/root/search(q=%27.obj%27)?select=name%2Cid' \
--header 'Authorization: Bearer .....' \
--header 'Content-Type: application/json'
Often times when you need to execute scripts against Graph API like curl, PowerShell SDK for Graph does a better job if the environment supports it. If the Environment your code will run in does not support PowerShell, then you just need to replace the URL on Graph Explorer with the URL part of the curl.
Learn more about Graph API PowerShell SDK https://learn.microsoft.com/en-us/powershell/microsoftgraph/?view=graph-powershell-1.0