Depois de algumas horinhas tentando e vendo a resolução de outros colegas pra tentar entender, consegui fazer meu próprio código funcionar. Provavelmente não está impecável nem muito bem escrito mas foi o que eu consegui fazer. Queria saber se é normal ficar tão perdido ainda nessa etapa na formação de "iniciante", pois eu sinceramente não iria conseguir replicar esse código do zero sem a ajuda do fórum. Abaixo segue o meu código.
const listaDeTeclas = document.querySelectorAll('input[type=button]');
const telefone = document.querySelector('input[type=tel]');
for(let i = 0; i < listaDeTeclas.length; i++) {
  const teclas = listaDeTeclas[i];
  teclas.onkeydown = function(evento) {
    if(evento.code === 'Enter' || evento.code === 'Space') {
      telefone.value += teclas.value
      teclas.classList.add('ativa');
     }
  }
  teclas.onkeyup = function(KeyboardEvent) {
    teclas.classList.remove('ativa');
  }
}
 
            