Donāt just slap an arbitrary background behind a photo without knowing exactly what you wanted to express in the image. A painting is a cohesive whole, not subject cut from a complete scene and then with an arbitrary background swapped in. When you start designing the overall layout/composition of an image, you need to know what the whole thing is supposed to look like. Do thumbnail sketches and color studies that are rough versions showing the composition, the lighting, the color palette, etc, and once you have worked out all the potential problems in the image, you start working on the actual painting.
Another problem with less experience artists doing background swaps is that they have very weak understanding of perspective, lighting, and colors, and they often end up with the subject and the background mismatched, with contradicting lighting, incorrect perspective, wrong color casts, etc.
If this is just a technical exercise to practice your skills in copying an image accurately, then why bother swapping out the background?
Next time, spend the time thinking about what you want to express/convey first, then do sketches to work out the composition, lighting/color studies, etc before you even start the actual painting. (This is for original works where you came up with your own narrative and want to express emotions/moods and communicate ideas, or to portray original designs such as concept art).
For technical copy exercises, you only need to focus on getting things looking as accurate and as much like the original as possible.
For artistic interpretations (such as portraits, landscapes, still life, etc), you focus on the execution itself such as expressive brushwork, aesthetic sensibility in color choices and value management, or if youāre after realism, push for the utmost realistic details and accuracy (realism from photos is a bit of a pointless artistic statementāitās better suited for technical exercises. For SERIOUS realism, you work from life only).