There are two kinds of Safari Extensions.
1. Safari Extensions
2. Safari App Extensions
Safari extensions https://support.apple.com/guide/safari/get-extensions-sfri32508/mac
Get extensions to customize Safari on Mac
You can install Safari extensions to customize the way your browser works. For example, extensions can help you display social media and news buttons, block content on websites, give you access to features from other apps, and more.
Tip: The Mac App Store is the safest and easiest way to discover and install extensions. The extensions are reviewed by Apple, and they update automatically when “Install app updates” is selected in App Store preferences.
https://support.apple.com/guide/safari/get-extensions-sfri32508/mac
Safari app extensions. https://safari-extensions.apple.com/
Safari App Extensions
Learn how Safari app extensions extend the web-browsing experience in Safari by leveraging web technologies and native code.
Overview
A Safari app extension can add new functionality to Safari by reading and modifying webpage content. These capabilites enhance the tools you use, the tasks you can accomplish, and the data you can access in your browser. A Safari app extension is uniquely useful because it can communicate with a native app. Sharing data between an app and Safari lets you integrate app content into Safari or send web data back to the app, enabling a unified experience for a web version and native version of an app
https://developer.apple.com/documentation/safariservices/safari_app_extensions