Like a lot of other outboards, the Yamaha has a black plastic lever, (trim sending unit) burried up under the motor bracket, behind the tilt tube. The lever contacts a plastic tab, on an adjustable ring which is attached to the tilt tube. And, like a lot of other outboards, it gets jammed because of corrosion. In a lot of cases, the unit will be jammed in the "full up" position showing no bars on the gauge.
Sometimes, you can get away with spraying the unit where it is, and working the lever back and forth, but if possible, it's best to remove the sending unit, to free it up, especially if it's badly frozen, because you can end up stripping the square socket in the plastic lever.
Depending on the year/model you might be able to get at the 2 mounting screws with a long phillips screw driver, (just above, and behind the tilt tube) from the front of the engine. Once you have it off, remove the lever, (small phillips head screw) spray some lubricant, (wd-40) and rotate the sending mechanism back and forth using pliers. Apply some grease, re-attach the lever and re-install the unit.
Replacement sending units are around $70 to $80!