I am wondering about the order of terms from equation 34 this pdf by Hitoshi Murayama on second quantization. Specifically, why they are able to pull the H past the $\Psi(\vec x)$. i.e.
$$ H|\psi(t)\rangle= \int dx\,H \Psi(\vec x,t)\phi^\dagger(\vec x)|0\rangle $$
makes sense, but how are they allowed to pull H in front of $\Psi(\vec x,t)$: $$ \int dx\,H \Psi(\vec x,t)\phi^\dagger(\vec x)|0\rangle= \int dx\,\Psi(\vec x,t)H\phi^\dagger(\vec x)|0\rangle $$
However, here we have $|\Psi(t)\rangle$ already in the x basis, so I would posit it is because H is an operator and we can move $\Psi(\vec x,t)$ around. Yet, I find issue in this, because H frequently involves derivatives, since for a free particle it is $\frac{P^2}{2m}$, which involves a derivative in the x basis.
As a side note to help understand my question: For example, when inserting a complete set of states into an inner product, the order of operators, bras and kets are never changed, until we project the kets into a basis (i.e. the x basis):
$$\langle\psi|\hat A|\phi\rangle= \langle\psi|\mathbb I \, \hat A |\phi\rangle= \langle\psi|\Bigg(\int |x\rangle\langle x| \, dx\Bigg)\hat A |\phi\rangle= \int\langle\psi|x\rangle\langle x|\hat A |\phi\rangle \, dx= \int\psi(x)\phi_A(x)\, dx= \int\phi_A(x)\psi(x)\, dx $$