Postpartum OCD can bring intrusive, disturbing thoughts about accidentally or intentionally harming your baby, along with compulsive checking or avoidance meant to keep those thoughts from coming true. These thoughts are distressing precisely because they go against what you want, and having them does not say anything about the kind of parent you are.
In therapy, the focus is on understanding intrusive thoughts for what they are, thoughts rather than intentions or predictions, and reducing the compulsions that feel protective but actually reinforce the anxiety. If these thoughts feel severe or frightening, please also talk to your doctor or a perinatal mental health provider right away, alongside starting therapy.