That unless you are in a pure code monkey position, programming is at most, 30% of the job and there is an array of skills that have nothing to do with programming that when mastered, will give the impression that you are an expert programmer.
More often than not, you'll be well advised to first get to understand the problem you're supposed to be solving and come up with a good solution rather than what you're told at first. The XY problem[1] is not limited to technical people, it will very likely also affect your boss or your customers.
Occasionally, there's even the counterintuitive case where you can handle more use cases by deleting code, which I personally find very rewarding :)
[1]: https://meta.stackexchange.com/questions/66377/what-is-the-x...
I would also recommend learning how politics function in the workplace, if only so you can defend yourself from other peoples' black magic.