Try the single-celled formula:
Code:
=BYROW(UNIQUE(Table1[tableName]),LAMBDA(tn,tn & "," & TEXTJOIN(",",TRUE,FILTER(Table1[ColumnName],Table1[tableName]=tn))))
2023-06-09_094502.jpg
A little shorter:
Code:
=BYROW(UNIQUE(Table1[tableName]),LAMBDA(tn,TEXTJOIN(",",TRUE,tn,FILTER(Table1[ColumnName],Table1[tableName]=tn))))
I'm sure it could be streamlined more…
Edit: Apologies! I just saw you're using Excel 2016.