Dead bodies cannot feel pain as the brain is shut down and cannot send signals to the body through nerves.
So once you're dead you cannot hear, see or feel any pain or have any emotions etc.
The body does not know anything about what is happening and does not feel any fear or pain when they get cremated.