ALTER TRIGGER [insert_sales] ON [dbo].[sales]
for INSERT,update ,Delete
AS
update s
set s.qty=s.qty + i.qty - d.qty from stock s
left join
(select id,sum(qty) as qty from inserted group by id) i
on s.id=i.id
left join
(select id,sum(qty) as qty from deleted group by id) d
on s.id=d.id

You need a MERGE, because what happens when you delete the last row from Sales?

ALTER TRIGGER dbo.trgSales
ON dbo.Sales
AFTER INSERT,
UPDATE,
DELETE
AS
SET NOCOUNT ON;
MERGE dbo.Stock AS tgt
USING (
SELECT ID,
SUM(Qty) AS Qty
FROM dbo.Sales
GROUP BY ID
) AS src ON src.ID = tgt.ID
WHEN MATCHED AND tgt.Qty <> src.Qty
THEN UPDATE
SET tgt.Qty = src.Qty
WHEN NOT MATCHED BY TARGET
THEN INSERT (
ID,
Qty
)
VALUES (
src.ID,
src.Qty
)
WHEN NOT MATCHED BY SOURCE
THEN DELETE;