On Chrome browser
- Select Vertical ellipsis button () in the upper right corner
- Select Settings > Privacy and Security
- Click Site settings
- Scroll down to Additional content settings, click On-device site data
- Unselect Delete data sites have saved to your device when you close all windows
- Select Horizontal ellipsis button () in the upper right corner
- Select Settings
- Select Privacy, search and services
- On Clear Browsing Data > click Choose what to clear every time you close the browser
- Toggle off Cookies and other site data
- Close all Edge browser and reopen for changes to apply
Safari doesn't have options to automatically clear cookies upon exiting.