The way to write reusable code, similarly to the way to play go, chess, pool, table tennis, or to cultivate a garden, requires vision.
Vision is the way to think ahead, to predict the future and be prepared for it.
Work is not a mechanical place to just do what you are being told. Work is the place where you need to think and visualise. Visualise how the tool that you make for a purpose, can be reused for a slightly different purpose, therefore you can make it configurable, like a spoon-fork which shows vision.
Vision is at work, will always bring invention, just ask the question “how can this be used in a different way in the future – how generic we can make it – can we design this in the best way so that it can be adaptive to future improvements / upgrades / changes?”