Am I wrong for being sad?

So I just found out my cousin just died who I’ve known for years. He got really sick and he died a couple of weeks later. So today I’m crying and feeling really sad. My boyfriend knew because I told him. But later on that day. He asked me what’s wrong again and I told him that my cousin just died. He said “Well you don’t have to be sad all day.” That really mad me super upset so I didn’t even acknowledge him when he talked to me at all. Then after about 20-30 minutes he asked do I want a hug and then he hugged me.