They mean ”but”, but the nuance is slightly different.
”けど” is used to say the contradiction in two things objectively.
”のに” is used to say the contradiction in two things and it indicates your surprise, confusion, disappointment, or complaint.
- Leo:今朝は、なんで遅刻したの?
Why were you late this morning? - Ken: 目覚ましをかけたのに、鳴らなかった。
Although I set the alarm at 6 am, it didn’t go off.
--> He shows his anger and complaint because the reason he was late was the alarm not working properly and it wasn't his fault.
Ken: 目覚ましをかけたけど、鳴らなかった。
I set the alarm at 6 am, but it didn’t go off.
--> He just explains the fact why he was late.
- Leo: なぁ、なんか鳴ってない?ケンの携帯?
Hey, something’s buzzing. Is that you? - Ken: うん。んー、サラからの連絡だと思う。忙しいのに、いっつも連絡を欲しがるんだ。
Yeah. Hmm, Sara is texting. I’m busy, and yet she always wants to contact me.
--> He shows his disappointment and complaint. - Leo: そっか。忙しいのは分かるけど、返信したら?そうじゃないと、彼女(は、何か起こったんじゃないかと思って)心配するでしょう。それに、(携帯が)ずっと鳴り続けるよ。
Uh-huh. I know you’re busy, but you should reply. Otherwise, she will be worried about what might happen to you and buzzing won’t stop forever.
--> He just accepted Ken’s opinions but he suggested that Ken should care about his girlfriend.