Is search bar an AEM functionality / component. If it is, options are
1. you can make the hero banner configuration to be part of that component itself.
2. Hero banner component and search bar component exists as two different components in author, but using CSS, in preview/publish mode it will overlap the component.
If search bar is not an AEM functionality and its a third party injected mechanism, then
1. You can make a placeholder div in hero banner component and make the third party to inject it to that div. You can create configurations in herobanner dialog if you want to configure the position as well.