Install the official Twitch plugin from the Stream Deck Marketplace (older versions of the software call it the Stream Deck Store), sign in when the Twitch authorization page opens, then drag two actions onto separate keys: Create Clip and Marker. That is the whole setup and it takes about five minutes. The thing worth knowing before you do it is that those two buttons do different jobs, and most people searching for "clip markers" actually want both.
Clips and markers are different things
A clip is a short video Twitch cuts out of what just aired, up to 60 seconds taken from roughly the last 90 seconds of the broadcast. It exists immediately, it has its own URL, and anyone can watch it.
A marker is a timestamp on your own broadcast and nobody else sees it. It shows up on the timeline in your Creator Dashboard when you open the VOD later, so you can jump straight to that point instead of scrubbing. A marker needs a VOD to sit on, so if you have not turned on storing past broadcasts, do that first or the marker has nothing to attach to.
Setting up the keys
After the plugin is installed and authorized, both actions appear under Twitch in the actions list on the right. Drag Create Clip onto one key and Marker onto another. Give them different colors, because in the middle of a stream you are pressing by muscle memory and the two are not interchangeable.
The Marker action takes a description. This is the part almost everyone skips and it is the only thing that makes markers useful six weeks later. Set up two or three marker keys with fixed descriptions instead of one generic key: one that says "clip this", one that says "story, come back". The marker list in the dashboard then reads as a rough index of the stream instead of an undifferentiated row of dots.
If you would rather not install the plugin, a key configured to send the chat message /marker with text after it does the same job. That also means you can drop a marker from your phone if you are away from the deck.
What the buttons will not do for you
Markers live on Twitch, not inside the video file. Download the VOD and they stay behind on the platform. If your editing happens on a downloaded file, note the timestamps somewhere else before you pull it.
The bigger limit is structural. You only get a marker for a moment you noticed while it was happening, and while it was happening you were playing, reading chat, and talking. The bit your editor wants three months later is usually the aside at hour four that felt like nothing at the time. No button solves that, because the button depends on you already knowing.
That gap is what a search layer over the archive is for. If every VOD gets indexed once as it lands in storage, you can find the moment you did not flag by describing it, which is the opposite of the marker approach: markers require foresight, an index does not. Vivu works this way, so a stream from last March answers the same question as last night's without anyone having pressed anything during either one.
Other ways streamers handle this
Chat bots can clip on command, which hands the job to your mods and viewers. They are watching more carefully than you are, and they clip things you would never have marked.
OBS has a replay buffer that a Stream Deck key can trigger, writing the last N seconds to a local file. This is the route if you want the full quality source instead of Twitch's transcode, and it is the only one that survives your VOD expiring.
Chat replay itself is a free highlight detector. Message rate spikes when something happens. Scrubbing a VOD while watching the chat column is slow, but it costs nothing and it finds things markers miss.
When you do not need any of this
If you stream a couple of times a week and cut your own highlights the next day, a single Create Clip key covers you and the marker setup is overhead. Same if your content is one continuous thing, like a full playthrough that gets uploaded whole. Markers pay off when the person looking for the moment is not the person who was there, or when the looking happens weeks after the streaming.
The question to ask is how much time passes between a moment happening and someone going back for it. Short gap, one person, recent VODs: the two buttons are enough and you should stop reading about this. Long gap, someone else doing the search, hundreds of hours behind you: markers will fail you eventually, and the decision is whether you accept that or put something underneath the archive that does not depend on you having pressed a button.