There are plenty of proofs of the Prime Number Theorem with explicit error terms - it actually looks like a rather competitive field (see Remark 1.4 in https://arxiv.org/pdf/2204.02588.pdf). Several such proofs start by defining a smoothing function - an approximation $\eta$ to the function $1_{[0,1]}$ (which is the function taking the value $1$ for $0\leq x\leq 1$ and the value $0$ for $x>1$).
The function used by Faber-Kadiri (https://arxiv.org/abs/1310.6374) seems to be best in its class (piecewise polynomial functions $\eta$). But what is the best $\eta$ in general? The best bounds on PNT to date in certain ranges are given by Büthe (https://arxiv.org/pdf/1511.02032.pdf), who uses a smoothing function defined as an integral involving a Bessel function. (If he gives a proof that it is best, I've missed it.)
Of course one needs to explain what one means by "best". It seems to me reasonable to frame the problem as in Optimizing a smoothing function with the Mellin transform in mind , though the restriction there that $f(x)=1$ for $0\leq x\leq 1$ there is merely convenient, not necessary (and one really should require $f$ to be bounded). To repeat: how does one find $f:[0,\infty)\to \mathbb{R}$ bounded and differentiable such that $$\int_0^\infty |f(x)-1_{[0,1]}(x)| dx + c \int_T^\infty |(Mf)'(1 + it)| \cdot(t-T) dt$$ is minimal (for a given constant $c>0$), where $Mf$ is the Mellin transform of $f$?
(It would seem more obvious to have the second integrand be $|Mf(1+it)|$ instead of $|(Mf)'(1+it)|\cdot (t-T)$, but framing matters as we have is more robust, in that it allows for averaging methods.)