"My son cooks for me."
Translation:Min søn laver mad til mig.
Oh dear, this is one of the more difficult concepts for English speakers. In its very basics, the preposition for refers to the reason of an action, while til is talking about the goal:
- Jeg læser bogen for sin historie. - I read the book for (because of) its story.
- Jeg læser bogen til at lære dansk. - I read the book (in order) to learn Danish.
(If you know Spanish, they have a very similar concept with using por and para.)
In this sentence, "you" are the recipient of the action (and the food), so "you" are the goal here, hence til is used. If you use for in this sentence instead, your son would be cooking because you told him to.