If you want to set price update while changing the quantity in product detail page then paste below script
<script>
require(
[
'jquery', 'Magento_Catalog/js/price-utils'
],
function($, priceUtils) {
$(document).ready(function(){
$('#qty').on('input propertychange paste', function() {
changeCuPrice();
});
function changeCuPrice(){
var totalQty = $('#qty').val();
if(totalQty == 'undefined' || totalQty == ''){
totalQty = 1;
}
var price = $('.price-final_price .price-container .price-including-tax').data("price-amount");
totalQty = parseFloat(totalQty);
var flprice = parseFloat(price) * parseFloat(totalQty);
var inPrice = priceUtils.formatPrice(flprice);
$('.box-tocart .price-final_price .price-container .price-excluding-tax .price').text(inPrice);
}
setTimeout(function(){ changeCuPrice(); }, 500);
});
});
</script>
at this path
app/design/frontend/Vendername/Themenamge/Magento_Catalog/templates/product/view/addtocart.phtml

