>>14302832Attention in cogsci terminology is now called executive function because its generally thought to be synonymous with control. There are some memory games like dual n back which have some evidence of helping improving cognitive function. Consistent aerobic exercise, 30 minutes a day for a few months, has more reliably shown to do the same.
Specifically for attention, mindfulness meditation has decent evidence of improving attention and memory. By some spooky coincidence (or not), the original Buddhist terms for mindfulness meditation means both paying attention and remembering. At the very highest levels, Buddhist monks have controlled themselves as they burned or starved to death, which shows an almost absolute ability to ignore sensory input and maintain focus. There's a lot of bs about mindfulness meditation out there, but it is basically sitting on the floor and focusing all your attention on something, usually your breath. Going into more advanced mindfulness meditations, you practice "metacognition", which is attention focused on your own thoughts. Some say to observe and quell all thoughts. Some, actively recalling sutras, visualisations or Buddhist concepts. Others like Zazen, letting any intruding thoughts enter and pass through your mind.
This also has a decent body of evidence showing it reduces stress, mitigates depression, anxiety, etc.