This examination of conscience contains the question, “Did I doubt or deny that God exists?”
I think there is a difference between a passive doubt, i.e. experiencing uncertainty, and an active doubt, such as when I am skeptical of the promises my brother makes.
I suspect that it would only be this active doubt that could be a sin, but I don’t know what that would look like in practice. When I have struggled with doubt in the past, it has always been, so far as I know, in the passive form.