For tickets originating or terminating in the US, US law requires that the baggage allowance of the marketing carrier of the first segment applies to all segments of the ticket.
Thus, in your case and presuming that LH is the marketing carrier, it is LH's rules, not UA's rules which apply to what I presume is OTP-OGG with connections between.