Q:

Correspondence between quantum operators and classical formulas

Background
From what knowledge of quantum mechanics I have so far, it is a postulate that Hermitian operators corresponding to a certain observable act on a quantum state $\psi$ to produce a new quantum state. The eigenstates of these operators are the states with a definite value for the observable and the eigenvalue for each eigenstate is this definite value.
We also know that $\hat{H}$ is the operator corresponding to the energy. This means it should act on a state with definite energy to produce the value of the energy times this state. $\hat{H}$ acting on a general state (not necessarily an energy eigenstate) basically differentiates the state with respect to time (with an $i$ and a $\hbar$ thrown in).
So when solving a problem in QM we could find the energy eigenstates $\psi_{i}$ through the equation $\hat{H} \psi_{i} = E_i \psi_{i}$. We could also find the time evolution of an arbitrary state $\psi$ through the equation $\hat{H} \psi = i\hbar \frac{\partial \psi}{\partial t}$.
Now, the classical Hamiltonian of a particle that is in a potential is $H = \frac{p^2}{2m} +V(x)$. In a few YouTube videos I have seen on solving the Schrodinger equation, they say that this means the Hamiltonian operator for the quantum analog of this system must be $\frac{\hat{p}^2}{2m} + V(x)$ where $\hat{p}$ is the momentum operator. So that means the equation $\hat{H} \psi = i\hbar \frac{\partial \psi}{\partial t}$ turns into $\frac{\hat{p}^2}{2m} \psi + V(x) \psi = i\hbar \frac{\partial \psi}{\partial t}$ which means $ -\frac{\hbar^2}{2m} \frac{\partial ^2 \psi}{\partial x ^2} + V(x) \psi = i\hbar \frac{\partial \psi}{\partial t}$ after substituting for $\hat{p}$
The Question
My question is this:

How do we justify (mathematically or using some postulates of quantum or classical mechanics) that we can just replace the $p$s in the classical Hamiltonian formula with $\hat{p}$ operators to get the quantum Hamiltonian operator $\hat{H}$?

Edit 1:
I now understand the derivation of the momentum operator as the generator for translation. So I removed that from my question.

A:

I watched a few videos on YouTube on the Hamiltonian formulation of classical mechanics and how the Poisson bracket in it relates to the commutator in quantum mechanics. Here's what I found on the difference between a classical and quantum system and how we can somewhat mathematically justify the replacement of classical functions by operators:
Classical Mechanics
A classical system is defined by a phase space, which is a space of points $(q_i, p_i)$, as well as a function $H(q_i,p_i)$ on the phase space called the Hamiltonian which basically gives you the energy of a particular point in phase space.
There is also an operation called a Poisson bracket $\{, \}$ associated with a classical system which is a way of taking two functions on the phase space and forming a sort of "commutator" or relation between them.
Quantum Mechanics
A quantum system is defined by a Hilbert space which is a space of state vectors $|\psi\rangle$. Classical functions on phase space $f(q_i,p_i)$ are replaced by  operators $\hat{f} |\psi\rangle$ which act on quantum states. So, for example, the functions on phase space $x$ and $p$ are replaced by operators $\hat{x}|\psi\rangle = x|\psi\rangle$ and $\hat{p}|\psi\rangle = -i\hbar \frac{\partial |\psi\rangle}{\partial x}$.
We also want these operators to satisfy the condition that the commutator between them $[ , ] = i\hbar \{ , \}$ which is $i\hbar$ times the Poisson bracket between the classical variables corresponding to them. So $[\hat{x}, \hat{p}] = i\hbar \{x, p\} = i\hbar$
This mathematically preserves the structure of classical mechanics while also replacing phase space with Hilbert Space.
As this answer says:

... every time we say "here is something classical" and "here is something quantum" the move from classical to quantum is never a derivation. It might be clearer to say "here is something quantum" first, and then add "look, it has a similar overall structure to this classical equation, so the classical equation helps us on our journey into understanding the quantum one, and it can act as a mnemonic too."

