How do I force my Samsung to factory reset?

Turn off your phone, then press and hold the Power/Bixby key and Volume Up key, then press and hold the Power key. Release the keys when the Android mascot appears. When the Android system recovery menu appears, use the Volume Down key to select “Wipe Data/Factory Reset” and press the Power/Bixby key to proceed.

How do I force shutdown my Samsung Galaxy S9?

To force shut down your Samsung Galaxy S9+, press and hold the Power/Lock button. Simultaneously, press and hold the Volume Down button. The device will turn off. As soon as the screen goes black, release the buttons.