Lua record word under cursor

how do i get this to record word under cursor to the w register?

        vim.api.nvim_buf_set_keymap(bufnr, 'n', 'NUUUUU', '<cmd>let @w = "<c-r><c-w>"', opts)

when i check :reg, @w says its just ^R^W so it’s not grabbing the word under the cursor. the vim script version has quotes. I tried escaping the quotes and triple escaping the quotes to no avail.

What if you set the RHS to "wiw instead?

 vim.api.nvim_buf_set_keymap(bufnr, 'n', 'NUUUUU', '"wyiw', opts)

works