First, with procedures,
f := x -> a*x^2+b*x+c;
df := D(f);
plot( subs([a=123,b=456,c=789],eval(f)), 0..1000);
Now, with expressions,
f := a*x^2+b*x+c;
df := diff(f,x);
plot( eval(f,[a=123,b=456,c=789]), x=0..1000);
Here's what you were doing before. You set up f as an operator (a type of Maple procedure). And then when you enter f(x) Maple actually evaluates that procedure at the name x. So the result of calling f(x) is then an expression. That's why diff() would succeeds on it as you intend.
So you were mixing functions and expressions. That's not bad, but could be confusing to you. You might find it easier to stick with one or the other, until it becomes familiar.
Notice how, with procedures, the independent variable's name isn't important (and gets left out) when calling D() or plot().