40 something Dev here. Some things that have worked for me: eat a high fat/protein breakfast with little to no carbs. Stuff like avocado,eggs, sardines,spinach,seeds,nuts,coconut flour; regular exercise (duh); supplement a good omega oil; Lions mane mushroom extract; eliminate distractions;good headphones; daily meditation (TM is a good place to start);use a knowledge manager like obsidian and write everything down in it;always think 'whats a better way to do this' because there is one