You can cut the picture with a pen, directly create a new layer for the gray background picture, and just set the foreground color filling directly (press Alt+Delete), or cut out the product with the lasso tool first, or simply use the magic wand. Press the V key to drag the cut product drawing directly to another drawing, and then put the cut product on a drawing with a gray background.
Supplement: If there is a big contrast between the solid color part of the background and the main body, directly select the background with magic wand or color model and fill it with white.