Since you cannot access the phone’s settings normally, you must use a workaround:

Users can flash official firmware directly through the tool's interface.

Samfw.com explicitly states that the tool is for educational purposes and legitimate ownership recovery. By downloading and using the software, you agree to comply with your local laws.