Fix Shopping cart empty after login / registration

To fix the issue you should enable Persistent Shopping Cart

Please follow these steps to enable Persistent Shopping Cart

Step 1. Log in to your Admin Panel and go to Stores > Settings > Configuration.

Step 2. Open the Customers tab and select Persistent Shopping Cart.

Step 3. Uncheck the Use system value checkbox and set Yes in the Enable Persistence.