Get everything in writing from the airline right now, while the flight is fresh in their system - that's your only leverage for a compensation claim later. "Mechanical issues" covers everything from a faulty sensor to an engine problem, and the airline has zero incentive to spell it out unless you force them. Call their customer service line, reference your flight number and date, and ask them to provide the specific reason for the delay in writing via email. Keep that email.
Depending on where you were flying and which direction, you may qualify for compensation. If this was a domestic US flight, the DOT doesn't mandate compensation for delays (only for overselling), but you're entitled to rebooking on another flight at no extra cost and, if the airline caused the delay, meals and hotel if you're stuck overnight. International flights have stricter rules - EU regulations give you up to €600 depending on distance, and Canada and Australia have their own schemes. Most airlines will try to weasel out of paying if you don't have documentation, so that written response matters.
Start by filing a complaint with the airline's customer relations department within 30 days. Include your missed connection and any expenses you incurred getting to your destination another way. If they deny you, file with your country's aviation authority (DOT in the US, CAA in the UK, etc.). It's annoying work, but airlines bank on people giving up. The fact that they kept you in the dark for three hours without updates just makes their case weaker.