Solution: We have \begin{align*} & 2xy+6x+\left( x^{2} -4 \right) y^\prime = 0 \\ \implies & \left( x^{2} -4 \right) y^\prime =-2xy-6x \\ \implies & \left( x^{2} -4 \right) y^\prime = -2x(y+3) \\ \implies & \frac{y^\prime }{y+3} = \frac{-2x}{x^{2} -4} \\ \implies & \int \frac{\mathrm{d} y}{y+3} = \int\frac{-2x}{x^{2} -4}\mathrm{d} x,\qquad x\neq \pm 2 \\ \implies & \ln \vert y+3 \vert = \int -\frac{\mathrm{d} u}{u},\qquad u=x^{2} -4 \\ \implies & \ln \vert y+3 \vert = -\ln \vert x^{2} -4 \vert +C \\ \implies & \ln \vert y+3 \vert +\ln \vert x^{2} -4 \vert = C, \end{align*} where $C$ is an arbitrary constant.
Simplifying the above, we have \begin{align*} & \ln \left( \vert y+3 \vert \vert x^{2} -4 \vert \right) = C \\ \implies & \vert y+3 \vert \vert x^{2} -4 \vert = e^C \\ \implies & (y+3)\left( x^{2} -4 \right) =\pm e^C = A\\ \implies & y+3 = \frac{A}{x^{2} -4}. \end{align*} Therefore, the solution of the differential equation is \[ \textcolor{blue}{\boxed{y(x) = \frac{A}{x^{2} -4},\quad x\neq \pm 2}} \]