Short-term (working) memory holds a handful of items for seconds — a phone number before you dial. Long-term memory stores information for days to a lifetime. Consolidation moves selected information from short- to long-term storage, mostly during sleep.
Attention strengthens short-term encoding; sleep strengthens long-term consolidation. Good habits support both far more than any single supplement.