Your goal should be solving the problem first and foremost

See:

Remember that your goal is to solve the problem, not necessarily to write code to solve it. Take the time to understand what already exists—inside and outside your organization—before building something new.

(Reilly 2022)

Stages of problem solving

The goal isn’t to Metagame the problem (i.e. productivity porn) – just solve it.

Bibliography

Navarro, Douglas. 2021. “Don’t Just Write Code, Solve Problems.” Medium. https://betterprogramming.pub/dont-just-write-code-solve-problems-b5c4ed3f9d0d.
Reilly, Tanya. 2022. The Staff Engineer’s Path: A Guide for Individual Contributors Navigating Growth and Change. Sebastopol, CA: O’Reilly Media.
Tabacu, Raul. 2020. “You’re Not Writing Code, You’re Solving Problems.” Lanraccoon. https://lanraccoon.com/2020/youre-not-writing-code-youre-solving-problems/.