Sleep is far and away the most powerful. Nothing else even comes close.
Next would be exercise of some kind.
Good support system is right up there too.
But good sleep still wins.
Every single nootropic med seems a poor substitute trying to compensate when the above are lacking. Coffee/caffeine is probably the most popular and does have some decent evidence of improving cognitive function when you’re tired, at least temporarily. Lots of rx stimulant use also seemingly trying to compensate for lost sleep. Can’t beat the real thing though.
But having played around with countless other nootropics over the years, I found that for me they simply paled in comparison to 8 hours of sleep and a good morning swim.