I'd bet on Hall Effect.
On a 5V Hall sensor, the three pins are: ground, +5V power, and variable ~0.5-4V signal which depends on magnetic field strength. Minimum signal is >0V, max is <5V, and you get built-in fault detection unlike a potentiometer. With power on (and hooked up the correct way) it looks sorta like a pot but slightly different voltage range. Without power, it just sits there and a resistance check shows open circuit.
The shift position sensor attaches to the end of the shift drum. If you read the voltage off the sensor, you can figure out the rotation angle of the shift drum, and you know what gear your in.
Looks like earlier MT09's used a separate mechanical contact for each gear position, "simpler" but less reliable.
Free service manual for a 2021 MT-09: https://www.manualslib.com/manual/2804501/Yamaha-Mt-09-2021.html
That manual may or may not be worth anything, but some gear position sensors on ebay said they worked for 21-23 or 21-24
On the wiring diagrams, the shift position sensor shows three wires all coming from the ECU, and does not indicate what each wire does. Wonderful. I didn't see a test for the shift posn sensor, but I could well have missed it.
pg 419 of the manual: the test for the throttlebody servo uses 3V (2x 'C' batteries), so the ECU seems to run other stuff on less-than-12V?
Very surprisingly, the crank position sensor is 2-wire variable resistance? I have no idea how that works.
Here's a 'simple' DIY Arduino project that includes a gear indicator. The basic idea seems to work, the difficulty is filtering out 'noise' to make it more robust/reliable (which is the difficult part of many 'simple' Arduino/etc projects)
https://forum.arduino.cc/t/motorcycle-gear-position-indicator/238303/6