1: Capturar elemento(s) HTML
let button = document.getElementById('teste')
2: Atribuir escuta de eventos ao elemento
button.SetEventListner('click', update)
3: Função ao ser executada ao clicar
function update {
button.style.backgroundColor = 'blue'
}