When I restart my Samsung Galaxy S9, the screen timeout value changes to "()".
Notice that's not a zero; it's two parentheses. That's literally what appears in the settings. However, the phone must think of it as a zero, because the screen goes dark immediately when I'm not touching it (and then I have to enter my password again).
This setting change also happens if I have the Power Mode in "Maximum Power Saving" and I switch to a different Power Mode. I don't think it happens in Safe Mode.
This started happening a few months ago. It also happened with my old Galaxy S7; my solution was to get the S9. (JK, I had other reasons too.)
EDIT: Yes, Cody: I can set the timeout to any value, but when the phone restarts or comes out of "Maximum Power Saving", the timeout is reset to "()".