Welcome to PF.
The canonical commutator ##[x, p] = i\hbar## can be derived with basic calculus (the product rule). We apply the operators x and p to a wave function f(x) in different orders and compare
$$px\,f(x) = -i\hbar \frac{\partial}{\partial x} x f(x) = -i\hbar (1+ x\frac{\partial}{\partial x}f(x) ) = (-i\hbar + xp)f(x)$$
Since f(x) is arbitrary, we have determined
$$px = -i\hbar + xp$$
$$[x,p] = xp - px = i\hbar$$
The origin of ##p= -i\hbar \frac{\partial}{\partial x}## can be understood by considering its action on plane waves. If we have a plane wave ##e^{ikx}##, then applying the momentum operator ##p## extracts a factor of k (k is called a wavenumber which is spatial frequency)
$$-i\hbar \frac{\partial}{\partial x}e^{ikx} = -i\cdot i \hbar k \cdot e^{ikx} = \hbar k\,e^{ikx}$$
So when you apply the momentum operator to a plane wave it returns the same function times a factor of momentum ##p=\hbar k##. So the momentum operator gives a factor of the momentum value when operating on a plane wave.
This enables you to write a differential equation that will satisfy a relationship between variables such as wavenumber k, frequency, or energy. For some differential equations you can cancel the function on both sides of the equation and be left with an algebraic equation in terms of variables like frequency and energy. This is basically how Schrödinger arrived at his famous equation.