How to remove the $\exp(-i(p^0+q^0)x^0)$ term in the canonical commutation? Using the convention A Modern Introduction to Quantum Field Theory by Michele Maggiore Eq. 4.2 or equivalently the quantum theory of fields by Steven Weinberg Eq.1.2.63.

$\phi(x)=\int \frac{d^3p}{(2\pi)^3\sqrt{2E_\vec{p}}}  (a_\vec{p} e^{-i\bar{p}\cdot \bar {x}}+a_\vec{p}^\dagger e^{i\bar{p}\cdot \bar {x}}) $

where $\vec{p}$ represented 3 vector and $\bar p$ represented 4 vector.
(*David Tong's lecture Quantum Field Theory Page 23 Eq. 2.18 apparently used a different convention where $e^{i p^0 x^0}$ was excluded from the expression noted above the expression. This might be the case of Quantum Field Theory and the Standard Model by Matthew D. Schwartz Eq. 2.78 where the exponential was absorbed into the ladder operator.)
One wanted to show that

$[a_\vec{p},a_\vec{q}^\dagger]=(2\pi)^{3}\delta^{(3)}(\vec p -\vec q)$

However, in expanding $[\phi(x),\Pi(x)]$, or even just $\int d^3 x \Pi(x) \Pi(x) $,
there's term of $a_{\vec p}a_{\vec q} e^{-i (p^0,+q^0) x^0}$ and $a_{\vec p}^\dagger a_{\vec q}^\dagger e^{i (p^0,+q^0) x^0}$ show up in the final expression at $(2\pi)^3 \delta(\vec{p}+\vec{q})$.
They could not be removed because all the integration was in 3 vector.
How to remove the $\exp(-i(p^0+q^0)x^0)$ term in the canonical commutation?
 A: It appears you have a few different things muddled up. Firstly, the equation you reference from Tong's lecture notes is not $\phi(x)$, it is $\phi(\vec{x})$. This isn't a case of conventions, these are different objects; in QFT textbooks one typically first introduces the time-indepedent $\phi(\vec{x})$, then covers time evolution, before introducing $\phi(x)$ in terms of the four-vector $x$. If you see equation (2.84) in Tong's notes he then introduces the same
$$ \phi(\vec{x},t) \equiv \phi(x) = \int \frac{d^3 p}{(2\pi)^3} \frac{1}{\sqrt{2E_{\vec{p}}}} \big(a_{\vec{p}}e^{-ip\cdot x} + a^{\dagger}_{\vec{p}}e^{+ip\cdot x}) \ \ . \tag{1}
$$
Hopefully this alone clears up some confusion.
Similarly, the commutation relations I believe you mean are the coordinate space commutation relations,
$$ \tag{2}
\big[\phi(\vec{x}), \pi(\vec{y}) \big] = i \delta^{(3)}(\vec{x}-\vec{y}) \ ,
$$
which is completely equivalent to the harmonic oscillator relations
$$ \tag{3}
\big[a_{\vec{p}},a^{\dagger}_{\vec{q}}\big] = (2 \pi)^3 \delta^{(3)}(\vec{p}-\vec{q}) \ .
$$
(I assume you now know the form of the time-independent fields $\phi(\vec{x})$ and $\pi(\vec{y})$, and so this calculation is straight forward.)
You can also use equation (1) and the corresponding conjugate momenta (so we're working with four-vectors now) along with the equal-time commutation relations (where $t$ is fixed) to also derive (2) and (3),
$$ \tag{4}
\big[\phi(\vec{x},t), \pi(\vec{y},t) \big] = i \delta^{(3)}(\vec{x}-\vec{y}) \iff \big[a_{\vec{p}},a^{\dagger}_{\vec{q}}\big] = (2 \pi)^3 \delta^{(3)}(\vec{p}-\vec{q}) \ .
$$
As mentioned in the comments, the Schrodinger picture uses the time-independent field operator $\phi(\vec{x})$ whilst in the Heisenberg picture we have the time-dependent $\phi(x)$. Both pictures must agree at a fixed time, e.g. $t=0$, which is why the equal-time commutation relations must be the same as those for $\phi(\vec{x})$ in the Schrodinger picture.
As for the calculation itself, if your question wants you to work with the time-dependent fields, you should then just use the commutator $\big[\phi(x),\pi(y)\big]$ evaluated at equal times $x^0 = y^0$. From this you will obtain (4).

Note that I have tried to stick to OP's conventions above, but please correct me if anything is inconsistent.
