Sketch on the surface (top plane) you want the groove, the path for the cut to follow, or where the o-ring will sit
Sketch normal to this plane the shape of the cut, ie hemisphere/half a circle. this mimics the o-ring shape. you may have to put this plane in a bit from the right plane
Click swept cut tool, click the shape of the groove, then the path of the groove