How do I show search bar components and keyboard in mobile app?

I create 4 variants (main component, and 3 variants) for the search bar. When I check the prototype, the search bar and keyboard are not coming at a time. both interactions were not appropriately done. If the keyboard comes search bar disappears or vice versa. I want to show both to come at a time and while clicking on the keyboard the 4th variant will show up with search items.