I want to get search results for document library column name (Eg: id specified) in the modern sharepoint teams site collection.Please help me in creating this.
In SharePoint search directly we can't refer the document library columns names, it happens through the crawl property and manage property mapping.
In modern SharePoint online, it's recommended to use the PnP modern search web part.
Refer to the below article on how to configure PnP modern search web part:
We could use custom query(use Keyword Query Language) in highlighted content web part to custom search , please refer to https://support.microsoft.com/en-us/office/use-the-highlighted-content-web-part-e34199b0-ff1a-47fb-8f4d-dbcaed329efd#bkmk_filtersort