DuckDuckGo is installed by default as a search engine.

1. There is a possibility that it is installed as a part of adware.
Use the latest release of MalwareBytes for Mac to remove malware/adware.
Install guide: https://support.malwarebytes.com/docs/DOC-1817
Uninstall Guide: https://support.malwarebytes.com/docs/DOC-1190
The installer may ask you to allow it in Security & Privacy /System Preference. Allow it.
Click the “Scan Now” button. Once done Quit Malwarebytes for Mac.
2. Uninstall extensions you have not installed knowingly.
Section: Manage extensions: https://support.apple.com/guide/safari/use-safari-extensions-sfri32508/mac
If Malwarebytes for Mac doesn't help, download EtreCheck: https://etrecheck.com/maspro and post the report here.
Click, “Free Download” button and then “Click to download” button,
open Downloads folder, click on it to open, and then select ”Open”.
Click on the bouncing EtreCheck icon in the Dock.
“Choose a problem” from the popup menu box, and then “Start EtreCheck” in the dialog.
Click “Share Report” button in the toolbar, select “Copy to Clipboard” .
Please post the report here when you reply.