You are allowed only one naming_series template and here you seem to have two.
Assuming you wish to generate a distinct series for your two STE types, 11 and 22, then define the naming_series say CODE-STE-.#####.-.YY.
Then in Stock Entry doctype add a Custom Field that contains a Select field named ‘code’ the lists Options 11 & 22. (So when a Stock Entry instance is created, you select either those option that is ‘pulled’ or substituted into the naming_series.)
Finally in the controller stock_entry.py define this
#key = “CODE-STE-.#####.-.YY.”
key = self.get(“autoname”)
name = frappe.model.naming.make_autoname(key)
self.name = name.replace(“CODE”,self.code)