One blue/white pair entering this box is power, the other goes to the lights. Per your comments the "lights" one is the one with the red wire.
You connected the lights to the LOAD side of the GFCI when you removed the dimmer, so they are permanently on now.
If the assumptions are wrong so is my answer. But if they are wrong, I can't see what the dimmer might connect to regardless of screws or wires.
Remove the wire nut. Connect the now-loose red wire to the gold terminal of the new dimmer and the blue one to the black terminal.
You need an extra bit of green or bare wire, connect the green screw on the dimmer to the one on the back of the box where the green wire is attached. Don't remove the existing one.
If you don't want the lights to go out when someone drops a hair dryer in the sink, and if you are allowed to have the lights non-GFCI-protected, move the red and white pair from the LOAD terminals to the corresponding LIVE terminals of the GFCI, where there should be a second pair of holes to accommodate them.