You must pass along the cookie header with the fetch request in order for your API endpoint to get access to the cookie from this request.
const res = await fetch('http://localhost:3000/contact', { headers: { cookie: headers().get('cookie') as string, },})