If you add the widget “WooCommerce Cart” into your sidebar, users will be able to see their cart contents update in real time.
Every time users add a new product, the cart updates via AJAX instead of making the page refresh.
In order to show the widget only on the pages where there is also a product form, enable the option “Show only in form” that you find in the widget.