You can turn off your computer while YouTube video is processing.
When your YouTube video is processing it means that the video is uploaded to the YouTube servers and the servers are processing your video to be available to watch.
The YouTube video will continue processing if you turn off your computer.
However if the YouTube video is still uploading and you shut off your computer then the YouTube video upload will fail because it needs your computer to be on to upload.
But once the YouTube video is uploaded to YouTube and is in the processing stage it's fine to shut off your computer or close the browser tab.