Hi @S.Raghu Nathan ,
Hope you are doing well.
With C# code and graph SDK, you can try below code to get a sharepoint site using the hostname and relative site path.
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var site = await graphClient.Sites["{hostname}:"].Sites["{server-relative-path}"].Request().GetAsync();
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".