Hi @Sukhbaj Singh,
Thank you for posting in this community.
Are you experiencing this error?
I checked the relevant information and came to the following conclusions:
It is not possible to embed a Google search bar using a frame code on a SharePoint site. This is because Google does not allow embedding of their search engine in this way.
Hope this information is useful to you.
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.