Принимаю данные в 
input и передаю в блок. Почему с классами работает, а с id нет ?
Вариант с классами:
window.onload = function () { 
        let text = document.getElementByClassName('input-form')[0]; 
        let box = document.getElementsByClassName('box-text1')[0];
        text.oninput = function () { 
            box.innerText = this.value; 
        }
    }
Вариант с ID:
   
window.onload = function () {
        let text = document.getElementById('input-form')[0];
        let box = document.getElementById('box-text1')[0];
        text.oninput = function () {
            box.innerText = this.value;
        }
    }