The 'Union' tool is very useful for this sort of thing. See: https://pro.arcgis.com/en/pro-app/2.8/tool-reference/analysis/union.htm
The resulting feature class will include all the attributes of both of the input feature classes, PLUS two 'FID_XXX' attributes - one for each of the FIDs (OBJECTIDs) of the original feature classes.
The areas that cover one of the input polygons but not the other will have the original FID (OBJEDCTID) of the relevant polygon input in the relevant 'FID_XXX' attribute, and will have '-1' in the 'FID_XXX' attribute for the other feature class (that does NOT cover that area).
The areas that are covered by polygons from BOTH input feature classes, will have non-negative FIDs values in BOTH of the 'FID_XXX' attributes.