All efforts sit somewhere on the Pragmatic Scale™️ There are two ends on this scale.
On one end, things are done very quickly in a very hackish way. We cut corners. We ship quickly. We break stuff.
On the other end, things are done very slowly in a very thorough way. We plan everything. We ship slowly. We don't break stuff.
There isn't one option that is better than the other. Sometimes speed is essential. Sometimes it's the right decision to be super thorough. Sometimes we risk overengineering for no good reason. Sometimes the consequences of getting something wrong are really bad.
Most of the time, the right solution sits somewhere between these two extremes. It always depends on the situation, on the context, on hundreds of variables.
There is no formula. Use your judgment and ask yourself where should this effort sit on the Pragmatic Scale ™️?
In case of uncertainty, ask your coworkers and your manager. Work together to find the best path to success.