does mybb has any option by which we can enable to show mycode content in search result?
no , this need custom plugin.
It’s unlikely it will work because search results only show a snippet of the content, so it the text is cut off before a mycode is closed, it wouldn’t work properly.