80% - Trim Limit Switch (one of two "pucks" with wires on them, over the trim pivots on the outdrive) is failed Open, or wire(s) leading into boat is open
10% - Trim Switch in throttle handle fails to make contact in UP but still works in Down
10% - Wiring/Connection/Corrosion problem
With a wiring diagram, you can unplug the Trim Limit side of the harness to those "pucks" at connectors near the Trim Pump, and test to see if the Trim Limit switch is closed when the drive is down in a running position. If it shows open, and the wires at the puck are not broken, you may be able to open the switch up and clean it. The other "puck" is the Trim Gauge Sender, telling you how High/Low the outdrive is hydraulically trimmed.
Switch "Kit" is at or below $100 but difficult to replace even with drive off because of bellhousing and bellows. But some here have done it.
You can continue to use Trail as Trim UP, just don't trim above what the normal range would be. If you can still see where the drive is from the gauge, you could wait till other repairs are being done to change the switch kit. If you have to use Trail to trim UP and can't tell how high it's going because the gauge doesn't work either, I'd suggest changing the kit now. If you've been putting other outdrive service, like bellows, off, then I'd suggest you do it all now.