MacBook Pro shuts down when I turn it on
So I have a 15'' Macbook Pro and when I turn it on, even though it's 100% on battery, my macbook shuts down after unlocking it. I try to turn it back on but can't, it says it's out of battery. The only way to turn it on is to connect it. I Only can work after doing this process. Does anyone have the same problem as I? And can someone help me please? Thanks.
MacBook Pro 15″, macOS 12.0