You can wipe only cache and dalvik cache, but if you found a bug that there isn't in 5.9.18 you need a wipe data (it'll delete you apps and data).
Ps. Why 5.9.24? It's the worst rom that you can install. It has serious bug, and it isn't the latest. 5.9.18 and 5.10.8 work fine
~ Xiaomi Redmi...