I can not construct a routine that will turn a fan on and after a 20 wait turn it off using a smart socket. When I add the actions to turn it on, wait 20 minutes and then turn it off, the turn on and off actions show and the wait after both. When activated the fan turns on and stays on.
I have a lot of routines set up to do similar things. Initially I ran into the same type of problems - here is how I solved them. When you set up the smart plug or switch, don't use the name of the item (i.e. kitchen fan), instead, name the switch or plug 'K F' (for Kitchen Fan). Create your routine in the Alexa app, and use the phrase 'Turn on the kitchen fan'. Add your actions - Turn on the K F, turn off the K F, and the wait 20 minutes. Also add an action for Alexa to respond 'Sure, I'll turn it off in 20 minutes'. Then reorder the actions in the routine (long press and drag) to what you want. Save it and it should work like a charm. Why the response of Sure, I'll turn it off in 20 minutes? If you have a custom response you'll ensure Alexa is running your routine - without it you'll just get an 'Okay' which may be just turning on your plug/switch.
Hope this helps, I have dozens of routines like this and they all work great every time.