I find myself saying this a little too often I think! Usually to my son, when he’s doing something super simple and making out as if it’s the hardest thing in the world. Or, when I see someone say or do something dumb on TV.
So really, you can say this whenever you feel that something really isn’t that hard. For example, when my mom can’t figure out how to switch to a video call on what’s app, I might say to her: oh come on, it’s not rocket science!
Be careful though not to vex anyone!