Intendi cosi ?

codice:
const inputs = document.querySelectorAll('input[name="dc"]')
const tarea = document.querySelector('textarea[name="tag"]')

inputs.forEach(input => {
    input.addEventListener('click', (e) => {
        const index = tarea.value.indexOf(e.target.value)
        const len = index + e.target.value.length
        tarea.focus()
        tarea.setSelectionRange(index, len)
    })
})