Turning off the Samsung S23 is really simple, and you have multiple ways to do it. A simple one is to swipe down from the top of the screen twice. This will reveal the quick settings, and at the upper part you can see a Power Off button. Press it, choose Power off and you will be good to go.
An alternative to this is to enable the power menu from the side key. Swipe down like you did above, but now you access the Advanced Features and choose Side Key. Then you switch the action to Power off Menu. When you are now pressing and holding the side key, your device will actually power off. Which is great because it allows you to shut down the device fast and it will work flawlessly.