That's probably a hardware issue. Old batteries start to drop voltage under high load or on low charge %. This causes the phone to glitch or just hard reboot if the voltage drops below spec. Likely just have to get a battery replacement.
I updated my old/spare phone - an iPhone SE3, which I think has a similar processor and memory (A15 and 4GB). It became a lot more sluggish. I learned my lesson not to upgrade my main phone, also an iPhone 13 mini.
I also noticed a disappointing slow down on a 9th gen iPad, which has even older internals. Actually, perhaps I should be quickly looking into downgrading that if it's possible.