For your requirements, I would suggest you use SharePoint filter Web Part to achieve this. Please refer to this article for more: https://support.microsoft.com/en-us/office/connect-a-filter-web-part-to-a-list-view-web-part-on-a-classic-page-4f3f6c10-0a1b-479d-8b4d-c4f1bf49bb3f?ui=en-us&rs=en-us&ad=us
If an Answer is helpful, please click "Accept Answer" and upvote it.
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.