They are both translations for "koken", so you can choose whichever sounds more reasonable in the context.
This is the opposite situation to "you" versus "jij" / "jullie". In that case the Dutch offers more information, with "koken" it offers less information, that's more general than the English.
In English, "to cook" is any sort of heating food beyond just getting it warm; specific types of cooking include boiling (in water), grilling (over fire), roasting (in an oven), baking (also in an oven - as a native speaker I can't explain the difference between "roasting" and "baking" except that pastries/cakes/pies can only be "baked", never "roasted", but I can't think of anything that can be roasted that can't also be baked), frying (in oil), microwaving/"nuking", and a few others.
Most of those methods can dry out a piece of chicken if you use them too long, but all of them except microwaving are commonly done to raw chicken. If you don't do something to chicken that counts as "cooking", you're probably not going to enjoy eating it, and you are very likely to get sick.
The difference is hard to explain, but I think roasting implies there is meat juice in the pan. Baking is cooking something in an oven that has no liquid outside the thing you are cooking. Chicken is roasted in a pan with gravy around it. A chicken pie is baked. The chicken pie is baked. The chicken and the gravy are inside the pie.
linguistically that's correct, but it doesn't make sense in English. Just because you can translate "boil" with "koken" doesn't mean that every instance of "koken" can be translated to "boil".
It's like saying a Ferrari is a car (that's correct), and then saying that a car is a Ferrari (this might be true, but most likely is incorrect, since only a small percentage of all cars is made by Ferrari). Dutch is less specific in this case "koken" <-> 'cars', while English is more specific "boil", "cook" <-> 'Ferrari'