I'm taking university calculus classes and we were told that we shouldn't treat $dx$ and $dy$ as variables. I had rationalized this by just treating $\frac{dy}{dx}$ and $\int{dx}$ as a part of the notation that cannot be separated. For example, by treating the $dx$ in an integral as a sort of "closing parenthesis" that shows what I'm integrating with respect to.
This worked for some time but it's also made it harder to wrap my head around other things. For u-substitution we were shown equations like $du=g'(x)dx$ which confused me. I couldn't wrap my head around Riemann–Stieltjes integrals using differentials of functions like $dg(x)$ either.
Is there a better way of approaching this? I feel struggling with the notation like this is making calculus harder to internalize for me.