I remember I had gotten in this situation long ago. But then when I switched keyboard clicks and lock sound on and off multiple times, it still wouldn’t work.
Why isn’t my keyboard, lock sound, and camera making sounds?
iPhone 8Are you running one of the beta builds on your device?
Are you possibly connected to a bluetooth speaker / device and the sound is down or off? This happens to me every time I get in my car. iPhone automatically connects to car bluetooth (in which I also have the radio turned down) and that's usually followed by "Why the fu..........ah, car bluetooth. Nevermind."
Silent switch on the side on?
Original thread: https://forums.imore.com/threads/why-isn%E2%80%99t-my-keyboard-lock-sound-and-camera-making-sounds.417072/