Hi @ adil
As far as I know, the webpart component in sharepoint online provides the filter function, but sharepoint 2019 does not have a ready-made filter function.
You can try to use spfx to add filtering function by creating a custom News component, but this process will be more complicated
(for example, you need to add some drop-down boxes to control the filtering conditions,
How to make New webpart realize the desired news according to the filtering conditions) , professional code development knowledge is required here, you can refer to the official method provided by spfx to mount components on SharePoint 2019.
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview
The relevant component code is provided here for your reference. The site provides a number of web part components, among which this is the relevant component for news posts.
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-global-news-sp2019
Hope it helps you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards
Cheng Feng