Based on your additional provided information. You can try this alternative.
=BYROW(C2:ZZZ, LAMBDA(r, IF(A2:A <> "", IF(COUNTA(r) = 0, "", COUNTA(r)), "")))
Output:
Reference: