Tom,
I upgraded from Big Sur 11.7.1 to Ventura 13.0.1. I had a custom defined mail header (Return-Path) and one primary mail rule name with about 30 entries [ Return-Path ] [ contains ] [ some miscreant address ]. Upgrading to Ventura disabled the single Mail rule, and removed the custom mail header, and all of the individual [ Return-Path ] rules that I had configured in that main rule name.
I recreated the custom mail header [ Return-Path ] and now as formerly controlled SPAM arrives in my Inbox, I select that single junk message item, and in Mail Preferences > Rules, add back its rule, and then invoking that rule, move the SPAM to Trash.
The only bright side to this is that some of those original 30 rules were no longer necessary and the originators changed their credentials or quit sending crap. Otherwise, it is a manual process to rebuild the rules.
Earlier, I mentioned [ Return-Path ]. Every email sent to you has a mail server authored Return-Path header entry and it is like a fingerprint for the sender. They can change their From email address and domain, but it will still have that Return-Path address. In most cases, these Return-Path addresses are accounts on private, or public Mail servers. When I select a SPAM message and then visit the Rules, when I enter [ Return-Path ] [ Contains ], the text of that Return-Path server is automatically entered adjacent to contains. I then edit that down to just the Return-Path server domain (e.g. spamya.com). When I save the rule, it will whack the selected mail message in real time, and any future emails from that Mail server.