When doing separable differential equations, why does Integrating a constant give a variable? ie. $\int -3 d = -3y$ I get that it is abit handwavy at this point in my math journey, but why does integrating a constant like this: $\int -3 dy$ result in -3y?

I get that when integrating a variable like y gives $\frac {y^2}{2}$ (below), but don't understand what to do when we are not integrating a variable like the above.
Okay, so if we have a function $y=ax$, calculating the derivative we get: $\frac{dy}{dx}=a$ so the derivative of a linear function is a constant. Now since integrating is the &quot;opposite operation&quot; of taking the derivative it makes sense to say that:
$$\int\frac{dy}{dx}dx=y+C=ax+C$$
Notice how we have an integration constant here though
Remember the power rule for integration:  $$\int 3x^a\, dx = \frac{3(x^{a+1})}{a+1} +C$$
In your case, $a=0$:  $$\int 3x^0\,dx = \frac {3x^1}{1} +C = 3x + C.$$