You can use this formula:
=LET(values,B1:E2,
headers,MAP(values,LAMBDA(v,INDEX(A1:A2,ROW(v)))),
HSTACK(TOCOL(headers),TOCOL(values)))
Via MAP the row headers are written to the same matrix as the values. Then you can use TOCOL to make a single column of each matrix - merging them by HSTACK