TL;DR answer: press the same sticky key again, twice.
Full Answer
I've been using Sticky Keys constantly, on all of my devices, for a decade.
1. Make It Visible
The easiest way to understand how they work is to see them.
Don't blame yourself for getting lost/confused/stuck/frustrated. Sticky Keys is unusable without a visual indicator.
On Windows, the built-in one looks like this:

Each of those four boxes represents one of the modifier keys:

So for example, if you press Shift, it will look like this:

Problems with Windows 11
This indicator used to just show up automatically whenever Sticky Keys is turned on, but now you have to go into Settings > Personalization > Taskbar > Other system tray icons and turn on the "Windows Explorer" icon:

But wait, it gets worse. Whenever your computer starts up again, Windows 11 will forget to show the icon. And you'll have to toggle Sticky Keys off and on to get it to show up (not the icon, Sticky Keys itself). To make this easier, you can create a shortcut to ms-settings:easeofaccess-keyboard. Luckily, the Sticky Keys toggle has input focus by default, so once you're there, you can hit Space once to turn it off and again (but not too fast) to turn it back on. You can also give shortcuts a global keyboard shortcut, for example Alt+F3, so that the whole sequence after log in is just Alt+F3, Space, Space, Alt+F4:

2. Basic Rules
The standard behavior across every "sticky keys" implementation is the same behavior that you get with Shift on a phone touch keyboard:
If you press the modifier key once, it is latched: it will be in effect for one key press, and then turn off.

If you press a latched modifier key again, it is locked: it will effect all further key presses without turning off

Once you press a locked modifier key again, it is back to off.

Oh, and if you use the modifier key as normal, it works as normal (hold the modifier, press another key, let go of the modifier - no modifier is latched).
3. Combining
Two different sticky modifiers are supposed to interleave freely.
For example, if you press Shift and then the Windows key, you'll have both latched at once:

..and then if you press the Windows key again, the Windows key will be locked, and then you can turn off the Windows key by pressing it once more, meanwhile Shift remains latched the entire time:
