Neither the temp table nor cursors are necessary for this:
update stock_table
set qty = qty - bi.qty
from stock_table st
join bill_items bi
on bi.item_id = st.item_id
and bi.itemcode = st.itemcode;
This assumes that each item is only present once in the bill_items table. If you can have multiple rows with the same itemid/itemcode you need a slightly different statement:
update stock_table
set qty = qty - bi.total_qty
from stock_table st
join (select item_id, itemcode, sum(qty) as total_qty
from bill_items
group by item_id, itemcode
) bi
on bi.item_id = st.item_id
and bi.itemcode = st.itemcode;
(Syntax not tested as you did not post sample data to play with)