Mathematics application cover letter, one page or two
My (limited) understanding is that longer cover letters are more common in the humanities and social sciences.

I've been on multiple hiring committees for tenure-track assistant professors at a mid-tier research institution. We didn't expect two-page cover letters, and for the most part cover letters were quite brief and pro forma. I don't remember seeing two full pages even once, and I don't remember any of the candidates we interviewed saying anything noteworthy on their cover letters. This was expected and fine with everyone on the committee.

There are some situations that might call for a longer cover letter (or at least for you to pay extra attention to this). In particular, I would recommend this when applying to liberal arts teaching-oriented positions. From what I have overheard, my understanding is that, on average, teaching-oriented math departments care about "fit" more than research-oriented departments do. (And moreover, when research-oriented departments do care a lot about fit, they don't seem to expect candidates to anticipate what the department is looking for.)

You might also write a longer cover letter if you can genuinely make the case that you are a good fit for a particular department. Don't BS, but offer good reasons if you have them.

A longer cover letter might be a good idea if your application is in any way unusual. If you are finishing up a postdoc, it is understood that you will be applying to a huge number of jobs, and a brief cover letter is usually fine. If you already have a tenure-track position and are applying elsewhere, or would prefer to work at a teaching-focused institution despite having a research-heavy CV, etc., then you might consider explaining yourself more fully.

Good luck on your job search!