When can you simplify partition function and Hamiltonian for a classical fluid?

I am new to statistical mechanics and classical mechanics.

A set of $$N$$ classical particles has a Hamiltonian

$$$$\mathcal{H} = K_N(q^{3N},p^{3N}) + U_N(q^{3N},p^{3N})$$$$ where $$q^{3N}$$ and $$q^{3N}$$ are the position and momenta of the particles respectively. $$K_N$$ is the kinetic energy and $$U_N$$ is the potential energy of the N particles.

I am struggling to understand when this Hamiltonian can be simplified to $$$$\mathcal{H} = K_N(p^{3N}) + U_N(q^{3N})$$$$

and one can split the classical partition function

$$$$\mathcal{Z} = \frac{1}{N!h^{3N}}\int...\int \exp{(-\beta \mathcal{H})} d^3p_1...d^3p_N...d^3\textbf{q}_1...d^3\textbf{q}_N,$$$$ into the configuration integral $$Q_N$$

$$$$Q_N = \int...\int \exp{(-\beta U_N)} d^3\textbf{q}_1...d^3\textbf{q}_N,$$$$

and a momentum dependent set of integrals. An explanation or clear external source is greatly appreciated. Does it depend on the temperature, the relative velocities and distances in the fluid and/or just the fact that $$U_N$$ only depends on distance (fex Lennard-Jones Potential)?

From the point of view of the kinetic energy, this is rather intuitive, since we know that the single particle kinetic energy can be written as $$\mathcal{H}_i = \frac{p_i^2}{2m_i},\quad K_N = \sum_{i=1}^N \mathcal{H}_i.$$
The problem is represented by the potential term. In this case, it is not always true that it can be written as a function only of the generalized coordinates. This is true only for certain types of interactions, for example when we are dealing with conservative forces. By definition, in fact, conservative forces are only dependent on the position in space where they are considered. As a consequence, also the associated potential energy is only dependent on the position considered. This makes your derivation more intuitive, allowing in the end to write the configuration integral as $$Q_N = \int \dots \int e^{-\beta U_N}\, d^3q_1 \dots d^3q_N .$$