Can I utilize more than $3k in capital loss carryover next year?

I had a sizable short term capital loss in 2021. I understand I can carryover $3k per year until it’s used up. However, if I have a short term capital gain in 2022 that’s in excess of $3k, can I use more of the capital loss carryover, or does that $3k cap apply no matter what?