Hi Laura,
You are on the right way, but the syntax is not correct. There are multiple ways of doing this, the one closest to yours would be:
ClearAll["Global`*"];
b=5;
pumpkin[a_]:=If[a<b,0,a+b]
Plot[pumpkin[a],{a,0,12}]
alternatively you could do it as:
ClearAll["Global`*"];
b=5;
pumpkin[a_]:=Piecewise[{{0,a<b},{a+b,True}}]
Plot[pumpkin[a],{a,0,12}]
or shorter versions:
ClearAll["Global`*"];
b = 5;
Plot[Piecewise[{{0, a < b}}, a + b], {a, 0, 12}]
Plot[If[a < b, 0, a + b], {a, 0, 12}]
I would suggest you to use piecewise, as this is designed for making piecewise functions, If was not. You can also see that they plot slightly differently at the transition a=b