Hello and welcome to Just Answer. I am a licensed veterinarian and would be happy to answer your questions.
I am very sorry to hear that you lost your dog at such a young age.
You mentioned that it was sudden. Were there any symptoms leading up to his death that seemed out of the ordinary?
One of the bad things about a sudden death is that we will never know for sure, but there are only a few conditions that are usually to blame. One of them is related to the heart. Dogs don't experience heart attacks as humans do, but can experience cardiac arrest or other conditions where there is an electrical malfunction of the heart that leads to little to no cardiac output and subsequent death. A second possibility would be a ruptured abdominal tumor which can cause a dog to bleed out into their abdomen. This would be less common in a young dog and more often than not, there are signs of weakness leading up to death.
In either case, it is not a painful process and I would not expect his cry to be a response to pain. Keep in mind that as the body is shutting down, involuntary movements, respirations or vocalizations can occur and I suspect that may be the case. I would bet that he was not even aware he was making the noise.
I am sure this is very difficult for you to deal with. Even though he had a short life, as least he didn't have to suffer with a long illness. Please accept my condolences on the loss of your pet. Let me know if you have any further questions.