AppleScript: Activate all mail rules with "sort: " in their name
Pretty simple one-liner:
tell application "Mail" to set enabled of rules whose name starts with "sort: " to true

You don’t even need to get all those rules or their names; however if you want to do so it’s just as straightforward:
tell application "Mail" to get name of rules whose name starts with "sort: "

Note: your example starts with sort: but you asked about strings containing that string. If that is what you want then swap contains for starts with in the code I provided.