Hi @gayan guna ,
You could try the following steps to troubleshoot.
1.Set the permissions for the search crawler to Retrieve People Data.
Application Management > Manage service applications > Select the User Profile Service Application line > Administrators >Add the Default content access account > make sure that Retrieve People Data for Search Crawlers is checked
2.Make sure you type the sharepoint://hostname into the content sources.
3.Create a crawl rule. Go to Search Administration -> Crawl Rules -> Add Crawl Rule.
For Reference: SharePoint 2013: People Search Not Working
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.