It was dark before you uploaded it
The most common reason is the simplest: the footage was underexposed, and the bright phone screen you edited on hid it. Look at the original on a computer monitor at normal brightness. If it’s murky there too, brighten it before uploading. The guide to fixing a video that is too dark explains why cameras underexpose in dim light.
HDR footage and the SDR copy
When you upload HDR video, YouTube keeps an HDR version for HDR screens and makes a standard version for everyone else. If the file’s HDR information was lost or changed during editing, or the edit mixed HDR and SDR clips, the standard version can come out dim, grey or oddly contrasty. Exporting a plain SDR MP4 before uploading avoids the conversion altogether. Opening the clip in the tool here and exporting it gives you an 8-bit SDR file, and you can brighten it at the same time; see brightening iPhone video for HDR clips straight from the phone.
Video levels and colour settings in the export
Video is normally stored in “limited range”, where black is level 16 and white 235, not 0 and 255. If an editor exports full range but labels it as limited (or the other way round), players stretch or squeeze the levels: the result looks crushed and too dark, or grey and washed out. Leave range settings at their defaults unless you know you need otherwise.
Editing on a Mac adds another twist: QuickTime-based previews on macOS can display Rec. 709 video a little lighter than browsers and most other players do, so an edit that looked right in the editor can look darker and more contrasty once it’s on YouTube. Judge brightness in a browser, or on a second device, before you export the final version.