The simple answer is: the person who will do the work.
The obvious reason to do so is to have the highest confidence in the estimate: ask the expert! But a better reason is Ownership and Accountability. When someone else produces the estimate - perhaps the architect - then the person who actually does the work isn't bound to that estimate. Organizationally and critically, they have to accept the estimate that was handed to them. But they won't feel personally invested in that estimate. Would you?
When you're small, this is easy. A client has a request or the product owner has a backlog and the person who either picks up the card or the person who knows that part of the system the best estimates the work.
Some teams have an architect also estimate the work - or even the whole team - to reduce confirmation bias and our natural tendencies to (often) underestimate work. This is a great practice and I recommend it. But the person doing the work must be part of the group estimating process - and they can't feel pushed into "accepting" the group edict. Otherwise you again lose Ownership and Accountability.
As the organization grows, this gets increasingly difficult to do. Sometimes the organization may not know who will do the work as more than one team could be assigned or more than one expert exists for that part of the system. Sometimes its because the sales people are empowered to cut a deal and then manage the consequences later. Sometimes it's simply because organizations are trying to avoid context switching where estimating would force their key people to pause the project they're currently working on to estimate the new work coming in.
But whatever the reason, the only answer in the end is to ensure the person doing the work is the one estimating the work. In situations where an estimate must be produced early in the process and the right person can't be included in the process, then the only answer is to accept that this estimate is likely wrong. And to commit to the person who will do the work that they will have an opportunity to estimate the work before they start and timelines will be adjusted or managed accordingly.
It's hard. But if you don't do this, then the person won't be fully committed to the timeline - Accountability. And consequently, they won't be personally committed to ensuring the quality of their work - Ownership.