The new OS (with Liquid Glass) has SMS message categorization that works fine to filter spam IME. You still have to delete them if you don’t want the red dot, but at least I don’t get alerts any more.
I upgraded iOS just for this feature and am glad I did. Not a fan of Liquid Glass, though.