WEEKDAY.INTL
Date

Returns the day of the week corresponding to a date, with custom weekend parameters

Syntax:

=WEEKDAY.INTL(serial_number, [return_type], [weekend])

Example:

=WEEKDAY.INTL("1/1/2023", 1, 1)