Have you checked if you had any signs of depression? Coz it causes cognitive problems. I had to recover twice from depression and every time I had to fix my cognitive skills again. Anxiety? Leads to decline in focus too.
In general, lack of focus can be caused by different things. It's hard to say when there's no information on the lifestyle. Anyway. I use music for focus a lot. It helps. I also use supplements but I know my health issues. However, I'd say anyone can use Semax (it's peptide).
Exercise is helpful. Meditation helps too. Lately, I've been using Endel – it's an app with background music which provides a lot of options for ADHD in addition to other things.