Instructions
1) Open Safari.
2) In your Mac's menu bar, click History and choose Clear History.
3) In the field labeled "Clear", choose All History. Then, click the Clear History button.
CAUTION: If you are using iCloud, this will clear history in Safari on all of your devices (for example, iPhone) signed in to the same account.
4) In your Mac's menu bar, click Safari and choose Settings.
5) Click the Privacy tab. Then, click Manage Website Data.
6) Click Remove All.
7) Click Remove Now.
CAUTION: This cannot be undone.
8) Click Done.
9) Close the Safari settings window.
Outcome
Browsing history, saved cookies, and saved website data have been cleared out of Safari.
For more information, please visit Apple's support website at https://support.apple.com/en-ie/guide/safari/sfri47acf5d6/mac.