After updating the value of an input field, it stays empty in the inspector

As the title says, my input is technically not updating. I can see the new value on my page but I can not use it in my code. How could I update the fields without having to refresh the page?

document.getElementById("phone_id").value = telephone.phone_id;

I expect to be able to use the values in my code