Adobe Photoshop is a very powerful graphics editor designed primarily for processing raster images. Let's take a look at the easiest way to replace the background of an image using the Magic Wand tool.
Open the image for which you want to change the background in Photoshop. Select the Magic Wand tool from the toolbar.
Move the mouse cursor, which will be a magic stick, over the area of the image with the background. Left click. A selection is formed.
Next, move the cursor over the selected area, right-click and select "Invert the selected area".
A new selection is formed, but not the background, but the image itself will be selected.
Press the key combination "Ctrl + C" to copy the image to the clipboard. Open a new image with a background and paste a selection from the previous image using the combination "Ctrl + V". Scale the image if necessary. To do this, press "Ctrl + T", a frame with squares at the corners and edges will appear.
Hold down the "Shift" key (needed to maintain proportions) and drag any of the corner squares. Select the desired size and confirm the scaling by pressing "Enter". As a result, you should get something like this:
Note! The presented method is the simplest and can be effectively applied only to images with a monotone background.