Battery not detected, then detected but not charging
X1 Carbon 7th Gen
Prod # 20QDCT01WW
Booted up normally an hour or so ago but got a message "Battery not detected". Otherwise, was able to use the laptop normally. Vantage also said battery not detected,
Did a "Restart" to see if maybe it would then detect the battery. This time it wouldn't boot at all. Unplugged and replugged the charger at both ends. Each time the little pilot light near the USB-C ports did light up. After multiple tries and twiddling the power switch, the laptop booted up seemingly normally. Vantage says battery is healthy. Charged at 54%.
After 20 minutes or so of use, the battery indicator still says 54%. That is, no increase or decrease in the charge. It also says "plugged in".
I think this happened once before, maybe a year ago, but did not happen again until today.
I'm afraid to turn the laptop off for fear it won't start up again.
Any ideas what to do?