What's tricky here is that English 'yourself' is used in different ways. 'cook yourself' (with emphasis on 'cook') would be alarming! - that reflexive use of 'self' is Russian себя - Он думает о себе 'He's thinking about himself,' Он видит себя 'He sees himself.' Сам does not have this reflexive sense - instead, it gives emphasis. Она сама открыла дверь 'She opened the door herself,' Я видел самого́ президента 'I saw the president himself.'
'You yourself should cook' might make the difference clearer. Or try with different stress - You should cook yoursélf! (don't make anyone else cook) <> You should cóok yourself (!!!).
I debated between
You should cook yourself. (As in, you do it rather than get take-out or wait for someone to do it for you)
You should cook for yourself. (Which, to me implies, without context like here, that you are making food for you alone. But could also mean cooking for yourself/others as opposed to waiting for someone else to do it for you or always getting take-out.)
I think the english translation can differ without context.
I think it's really only the first (the sense that you yourself should do it). Сам is used for emphasis, not the recipient of an action (that would often be для себя or себе). A few examples might help:
Он сам это написал. He wrote it himself. [nobody did it for him, he didn't have any help] Я сделаю это сама. I'll do it myself. [a woman is speaking, saying she doesn't need help, she'll do it on her own] Мы видели самого президента! We saw the president himself!
as opposed to...
Он купил себе машину своей мечты. He bought himself the car of his dreams.
Я приготовил себе кофе. I made [for myself] coffee.
Когда мы поженились, жена взяла себе мою фамилию. Теперь я просто Иван. When we got married, my wife took my last name. Now I'm just Ivan.
You might even see both together, though it comes out a little clumsy in English: Женщины сами купили себе подарки к 8 марта Women themselves [emphasis] bought [for] themselves presents for March 8. Here сами is adding emphasis, since typically it's men are supposed to buy gifts for the women in their lives on March 8 (International Women's Day).