Hello,
Is there a way to automate the exporting of a feature class by different variables?
Try Model Builder and the Iterate Field Values iterator.
https://pro.arcgis.com/en/pro-app/3.4/tool-reference/modelbuilder-toolbox/iterate-field-value.htm
You will need to use Inline Variable Substitution in your output names.
More info on Iterators here:
Also worth having a look at the split by attributes tool as it's not entirely clear what your workflow is