A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Sequence doesn't like arrays, so change to
=SEQUENCE(MAX(LEN(TAKE(TEXTSPLIT(A1,"-"),,1))))
(TAKE returns an array from TEXTSPLIT's array, so the return from LEN is also an array). MAX collapses the array to a single value (MIN or INDEX or other functions would work as well).