I'll take a stab at this. I think it might be a sequencing problem.
In the first snippet, you're adding a cookie to the response headers. The cookie will be sent to your browser if you don't dd() first, and then will be returned to the app from the browser on the next request.
In the second snippet, you're reading from the request headers. This means you're inspecting cookies that came from the browser.
If you're trying to write to the response headers and read from the request headers without the round trip from the app to the browser and back again, you'll never see anything in the second snippet.