Hi Michael,
We can use calculated field, rollup field and business rule to implement it without code.
Since the relationship between the Quote line entity and the Product entity is N:1, and the relationship between the Quote line entity and the Quote entity is also N:1, we can
? create a calculated field for the Quote line to inherit the field 'current cost' of the Product.
? Then create a simple field to represent the total amount of the current cost of the quote line, calculated by business rule.
? Finally, create a rollup field for the Quote to summarize the total amount of current cost for all Quote lines.
Here is a demo.
1. I created a calculated field 'Current cost of product' for the Quote line entity, the calculated action is Set Current cost of product to productid.currentcost.

2. I created a simple field 'Current cost amount' for the Quote line entity and create a business rule, activate it.
If Current cost of product contains data,
Then set Current cost amount to Current cost of product * Quantity

3. I created a rollup field 'Current cost sum' for the Quote entity, set the RELATED ENTITY to Quote Lines (Quote), set AGGREGATION to SUM of Current cost amount.

4. Add all three fields to the form of the respective entity. The effect is as follows.
I have two products ‘one can of cool drink’ and ‘One pack of cool drink’, and their field ‘Current Cost’ has values of 2 and 12. I added them to a quote as two quote lines.
Set its Quantity to 30 and 5, so the total cost should be 30*2+5*12=120.



5. The rollup field is not refreshed in real time. It defaults to refresh every 12 hours. You can also manually refresh it by clicking on the calculator icon on the left and clicking the Recalculate button.
We can set its automatic refresh interval to a minimum of 1 hour.
Please refer to this blog for the setup steps: https://community.dynamics.com/365/b/sachinbansalmicrosoft/posts/dynamics-365-rollup-fields-important-points
In addition, by customizing the workflow, the rollup field can be automatically refreshed whenever the quote is updated.
But writing a custom workflow requires coding, please refer to these two blogs for details.
https://www.plusconsulting.com/forced-calculation-of-a-rollup-field-using-custom-workflow-activities-in-microsoft-dynamics-365/
https://technologyblog.rsmus.com/microsoft-dynamics/dynamics-365-customer-engagement/changing-rollup-calculation-frequency-microsoft-dynamics-crm-2015/
Or you can download the workflow tool to use directly.
Please refer to this theme: https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/273683/word-template-sums-calculations