It’s okay (it’s actually good) for your child to struggle a bit. Children need to work on their frustration tolerance to excel at problem-solving as an adult.
If you know your child can figure something out on their own, don’t give them the answer right away. Instead, help them think through the problem and consider potential solutions. For younger learners, you may provide more guidance on which direction to take, while older students may benefit from more of a hands-off approach.