It's mentioned in passing on the Lighthouse docs for the charset audit[1], but here's a great breakdown by hsivonen[2].
Of course, in the headers is even better. Point is, try not to have too much cruft before the charset.
[2] https://github.com/GoogleChrome/lighthouse/issues/10023#issu...