This is one of those things that's easier to respond to with more experience. When I was a more green developer just starting to work in a team, I'd probably have answered, "Yes, I could've tried making the code more open-ended and extensible for such a scenario."
Now, with decades of experience, I can answer, "No, because if we designed all of our code to be reusable for any potential use-case, we'd be adding in a ton of extra work that would often not pay out later. It's acceptable that if we go with a YAGNI principle that occasionally we'll have some code that seems to be duplicated work, but that's far better than constantly writing more code that we don't need as that will increase our design complexity, leading to longer development time and requiring additional testing."