Hello Manjusha Mangaonkar,
Thanks for reaching out. To get a site webURL for a group you can use the below query:
/groups/[GroupId]/sites/root?$select=webUrl
For the default Tenant site webURL you can use the below query:
/sites/root?$select=webUrl
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.
Thanks.