Thanks for bringing this to our attention! You are not doing anything wrong, I have been able to replicate this quite easily. It seems that our documentation and our actual widget behaviour on this one differ!
I am going to bring this to the attention of our engineering team so we can get this adjusted! In the meantime, the best way to get your apps working is to add a label when you call st.number_input('name').