in the documentation of day22; https://github.com/streamlit/30days/blob/521bd85ea7341951b73631385aa15f5de4d8ff11/content/Day22.md?plain=1#LL5C1-L6C1
it is mentionning that; "Typically, whenever a user interacts with a widget, the Streamlit app is rerun."
I think this is not entirely correct and Streamlit should intelligently updates only the affected parts of the app without rerunning the entire app.
Maybe certain widgets force to rerun the app but others streamlit rely on the cache