I want to change a "Quantity On Hand" field so I trying this code:
$change_id = $models->execute_kw($db, $uid, $password,
'stock.change.product.qty', 'create',
array(array(
'product_id'=>11745,
'location_id'=>15,
'new_quantity'=>26,
)
));
$models->execute_kw($db, $uid, $password, 'stock.change.product.qty', 'change_product_qty', [$change_id]);
But it doesn't work. How can I fix it?

For changing stock quantity for products you need to create a stock.quant record.
$models->execute_kw($db, $uid, $password,
'stock.quant', 'create',
array(array(
'product_id'=>11745,
'location_id'=>15,
'inventory_quantity'=>26,
)
));
Also keep in mind that directly changing the stock quantity is not recommended, it should be changed from a purchase order or a sale order or from production or inventory adjustments based on the situation.