The MSRP of a baseline 2024 Corolla is $22,050. No idea what you actually pay out the door.
Assuming both of those sticker prices are accurate, I might still be leaning towards the Toyota. I know it will last for a long time and have no problems obtaining parts/repairs so long as I own it.