The free throw is one of the few closed skills in basketball: same distance, no defender, time to prepare. That makes it a good example of how routines can help performance under pressure.
Consistent pre-shot routines are associated with steadier performance in many closed skills
Keeping the routine short and repeatable is generally recommended, rather than adding many steps
Pressure can make players overthink the mechanics; a simple external focus, such as the target, can help
Practice under mild pressure, for example with consequences, may help routines hold up in games
An example of a simple routine: step to the line, same number of dribbles, one breath out, look at the target, shoot. The details matter less than doing the same thing every time, including in practice.