Yes, your request is easily solvable using the Rule-based symbology.
In the stratigraphic unit/context polygon layer symbology, select the option Rule-based: here you can create different rules, one for each phase of your site using as a filter the expression
"Phase" LIKE "A"
picturing that your Attribute field with the phases information is called Phase and that the phases are A, B, C, etc..
When all your phases are ready, you can create a sub-category inside each of them, categorising the style according to the context number and filtering them with the phase info.
To do it, right-click in the rule label and in the menú and select Refine Current Rule > Add Categories to Rule
This will open a new window for categorising the symbology: here select the expression symbol in the right of Column and use the expression
IF ("Phase" like 'A', "Context", NULL)
Obviously , "Phase" is your Phase field and "Context" your Context field. Change the A, B, C, according to your phase name.
This will create a selection of contexts that have that phase as attribute. All the others will be ignored.
Press Classify and you will have your selection. I suggests to remove now the Null option (the green in the image).
Repeat the operation for all the phases.
Two necessary steps to have a good result are:
1. Make not visible the Phase symbol to allow the underlying symbols to be visible: to do this right-click in the Phase rule Label and select Change opacity from the menú > opacity to O.
2. The system, as you will realise, create a label for the context using the expression and his result. Double-click in the label name and change it from the default to the context number.
This will be your final result:
Hope that this suit your request. As a geomatics archaeologist, I can say to you "Have fun!"