XIAO SAMD21 Voltage output from pin 4

maybe try a logic level shifter to convert 3v3 to higher level or a 5V device like arduino Uno