The best way you can shut off a PC is not being careless. Don't just go down to the power button and just hold it down until it turns off, this won't severly break anything as there is a super rare chance of that happening, but it just cuts off every component inside the PC shutting it down without Windows taking care of a few things before a power off.
Worst of all, when the PC is on, don't go behind the computer and unplug it's power, or flip the PSU switch to off, this is the most improper way of shutting off a PC
The best way to turn off a PC properly is not doing that last part, but instead inside your operating system, probably Windows I'm assuming, you go to the power options and shut it down. This will allow your operating system to possibly give you time to save your work or possibly even do it for you and close tasks running in the background, clean up, and shut off your PC nice and cleanly
Sleep mode will just put your PC into a low power state and somewhat turn off your computer, but will still retain everything in windows
when it starts up again, the ram will be active only which is very low power
The power button will also be blinking, which is on all or if not almost on every pc
It will get off of sleep mode once the button is pressed again or the keyboard has a key that has been pressed or the mouse has been moved
Hibernate will write the current windows state to the Ram (I think in theory) and turn off your PC like you normally would on a shut down.
The Pc will be off like normal, but when you turn it back on, windows will be able to load from its previous state since its been retained in the memory
You said it's neither shutting it off manually in windows or by the power button that is proper, but I mean shutting down in the os is the most proper way you can do it, sleep can be too.