Streamlit inputs do not wait for user input. The logic flow of a Streamlit app is that your code is going to run top to bottom. Any widgets on the page will render with their default value. They will return that default value immediately and Streamlit keeps going all the way to the end of your page.
Then, when a user selects something, your page is going to rerun from the beginning. It will continue to render and keep going straight through any and all widgets, but now that one that the user just changed will be returning the new value they selected.