You can use the built-in library for this:
<xsl:value-of select="umbraco.library:RequestCookies('cookie')" />
Add this to your XSLT and you can invoke the macro on any pages of your site.
To complete the answer you should use
<xsl:value-of select="umbraco.library:setCookie('cookie')" />
to set the value and the above code to get the value.
source share