→ Force shutdown (hold power + vol down for 30 seconds). Boot back to TWRP and restore your backup. Always make a backup of your stock ROM before flashing.
Because there are few "dedicated" ROMs like LineageOS built specifically for the 2.4, you should look for GSIs. A GSI is a version of Android that can run on any Treble-supported hardware. How to Install a Custom ROM on Any Android Phone (Example nokia 24 custom rom