I'm finishing my second year at a top research university in mathematics, and my major gpa is still a 3.99, however my grades in other subjects have suffered tremendously due to the pandemic stress and online learning (B+ in a physics class, C+ and B+ in CS classes etc.) I have been completely burned out by zoom classes. My overall GPA is currently at a 3.7 but it used to be a 3.9 and it is only decent because I still have high grades in math, including rigorous honors courses. Before covid, I didn't know I wanted to pursue a PhD in mathematics but I started doing mathematical research a few months ago and found out that it is what I want to do with my life. But I have become increasingly worried about my declining performance during covid. I know that many PhD applicants have 4.0s overall and many more stellar qualifications from undergrad, so I am worried that I am nowhere near good enough at the moment. I guess I would like to know how lenient or strict PhD admissions are with online school grades.
The nature of the question suggests that this is in the US, so I'll assume that.
If your lesser grades are outside your major (math) and you otherwise have a good/great application including stellar letters of recommendation, then I think grades elsewhere will matter very little. Given the pandemic, even less.
Don't worry too much about it, but make sure everything else is first class. You can't do anything about the past in any case.