Select first. Change it safely.

Practise the selection tools, then turn a selection into a layer mask. Work on one image and see exactly what the white and black parts of a mask do.

STAGE
    ArchivoEdiciónImagenCapaTextoSelecciónFiltroVistaPluginsVentanaAyudaSIMULACIÓN DIDÁCTICA
    ✦  Asistido por IA▣  Editor profesional
    □ Suavizar Estilo: Normal ⌄ Seleccionar y aplicar máscara...
    estudi-seleccio.psd 100 % (RGB/8)
    640 × 400 px
    FROM THE LAB TO PHOTOSHOP

    What to do in the real app

    The names on the workspace match the Spanish menus in your screenshot. This is a focused practice space; try the same sequence in Photoshop with your own photo.

    M
    Marco rectangular / elíptico
    L
    Lazo
    W
    Selección de objetos / Selección rápida
    B · X
    Pincel · swap black and white
    CtrlD · CtrlZ
    Deselect · undo
    Alt + click
    Inspect the black and white mask thumbnail