There is a new column type in Dataverse called Formula (Preview) that you might want to look at. It will allow you to put in a formula so it automatically calculates the difference between the other two columns and will always be up to date. Only issue is that it's current in Preview so not recommended for production purposes.

Alternatively, you could have a Scheduled flow that runs every hour, retrieves all the items from your table, then updates the Stock.
For this example, I'm just using one of my old tables called Pets and have added the three columns (Purchase, Receipt, and Stock - all of type Decimal number) to it.
See full flow below. I'll go into each of the actions.

Recurrence is scheduled to run every hour.

List rows retrieves the items from your table.

Apply to each iterates over each of the rows and uses Update a row to update the Stock using the following expression. Note that your field names will likely be different to mine.
sub(item()?['cra85_receipt'], item()?['cra85_purchase'])

The result after running the flow.
