There are at least two ways to deal with this.
First, you can reflect on the idea that God is supposed to be able to do things that are not humanly possible. After all, no human being could ever even conceive of being able to create the universe and yet there it is. Obviously, things can happen that are far beyond the abilities of human beings. So, you can try to realize that God is capable of doing things that seem impossible to us because of our limited understanding. Presumably, it’s hard for our pets to understand how we make it get light or dark inside our houses at will. It could be that the gap between our understanding and that of God is at least as great as the gap between ours and our pets’.
Second, you can have faith in God without believing in the literal truth of many things that happened in the Bible. It is perfectly possible for God to exist, and for him to care for us and want us to act as the Bible tells us to act even if all the things that happened in the Bible are not literally true. You can think of the Bible as a set of moral lessons, not as a science book.