>Because the notation df/dx exists. Do people sometimes take dy/dx instead if f is the only function on a certain problem?
Only if they are using sloppy notation. If you want the derivative of f(x), you write df/dx. If you instead are given something like y=x^(2), then it would make sense to write the derivative as dy/dx.
>Also kind of unclear to me is the correlation between liebniz’s and newton’s way of taking dy/dx and f’(x) and how they are expressed.
So, the idea of Leibniz's notation is that instead of using an apostrophe ' to denote a derivative, we write d/dx in front. So you can write something like d/dx(x^(3)+3x-ln(x)) to mean "take the derivative of the thing inside the parentheses", for example. Likewise, the derivative of f is d/dx(f), and since the notation looks like a fraction, we often rewrite that as df/dx because that's how fraction multiplication works.
In some sense this is a meaningless symbolic manipulation that only *looks like* fraction multiplication, but one benefit of Leibniz's notation is that meaningless manipulations like this often give you the right answer anyway! For example, in Leibniz notation, the chain rule is df/dg dg/dx = df/dx, which "looks like" cross-cancelling the dg terms; the fraction notation makes the bookkeeping intuitive, as opposed to Newton's notation [f(g(x))]' = f'(g(x))g'(x) where it doesn't look like a tautology.
Similarly, if you want a *second* derivative, you are taking the derivative twice - ie, d/dx d/dx f. Again, simplifying this as if it were a fraction gives you d^(2)f/dx^(2): two d's on top, two dx's on the bottom, and the f in front.