Updated:

1. Place the seat

execute align xyz positioned ~0.5 ~ ~0.5 run summon minecraft:armor_stand ~ ~0.5 ~ {Invisible:1b,Marker:1b,NoGravity:1b,Tags:["seat"]}

Stand on a bottom-half stair and run it from chat. It centers on the block and puts an invisible stand at seat height. See armor stand commands.

2. Add a right-click box

execute align xyz positioned ~0.5 ~ ~0.5 run summon minecraft:interaction ~ ~ ~ {width:1f,height:1f,Tags:["chair"]}

An interaction entity is an invisible box that remembers who right-clicked it.

3. Seat whoever clicks

# repeat, always active
execute as @e[type=minecraft:interaction,tag=chair] at @s if data entity @s interaction on target run ride @s mount @e[type=minecraft:armor_stand,tag=seat,limit=1,sort=nearest]
# chain, always active
execute as @e[type=minecraft:interaction,tag=chair] run data remove entity @s interaction

on target switches to the player who clicked, who then rides the nearest seat. See the ride command.

4. Stand up and add chairs

Sneak to stand up. Repeat steps 1 and 2 on each stair; one set of command blocks serves every chair.

5. Remove a chair

/kill @e[tag=seat,distance=..2]
/kill @e[tag=chair,distance=..2]

Troubleshooting

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.