This is my Excel Ver.My solution suggestion was based on the information available to me which was ..
View attachment 118482
your Idea is good but not working to my excel sheetView attachment 118427
Formula in J1
Excel Formula:=LET(ven,G2:G13,inv,A2:A13,met,H2:H13,x,UNIQUE(ven),zinv,BYROW(x,LAMBDA(ra,COUNTA(UNIQUE(FILTER(inv,ven=ra))))),zcash,BYROW(x,LAMBDA(ra,COUNTA(UNIQUE(FILTER(inv,(ven=ra)*(met="cash")))))),ztfr,BYROW(x,LAMBDA(ra,COUNTA(UNIQUE(FILTER(inv,(ven=ra)*(met="transfer")))))),hdr,{"Vendor","Invoice","Cash","Transfer"},VSTACK(hdr,HSTACK(x,zinv,zcash,ztfr)))