That the whole point of "selection masks" aka "selection" for short. This tells Gimp where things can happen, everything outside the selection is left untouched. To create a selection you use one of the many selection tools(*). In your case if the picture is square and upright, you use the rectangle selection (
) otherwise you can use freehand (
) where you:


- click on the four corners,
- then back to the first to close. This gives you the "selection marquee" aka the "marching ants"
- at that point you can adjust the corners, you get a circle on them when you are close enough. Click down and drag to adjust
- when happy, double click inside the selection to commit/freeze it (if you switch to another tool this happens automatically)
- from then on anything you do on the picture only applies inside the selection
(*) Creating selections is a very important skill in Gimp...