When using a screenshot it’s best to match the background. Take a screenshot on a similar color background or use a PNG with a transparent background as this will look the most seamless.
Use images with a similar or transparent background
Don't use images with opposite backgrounds to the slide background
If you need to use a specific image but the slide background doesn't match, you can change the background color to match the image's background color.
Images can be added to any presentation by dragging and dropping, copy and pasting, or inserting from the toolbar in Keynote, Google Slides, and Figma.
Insert > Image > Upload from computer
Insert > Image > By URL