I assume you are on latest W10M when you refer to "an issue earlier"?
Either case, W10M or WP8.1, if you did a hard reset and the random reboot continues you may have a hardware problem.
Before that conclusion can be made we need to ensure that you are not recovering from a backup as some settings may cause some odd behavior as well.
So, if you did a hard reset and started from scratch without recovering from a backup and you still get random reboots, then we can probably safely assume it's a hardware problem
the simplest hardware problem is a loose battery. Some people had random reboots because the battery wasn't sitting correctly in the phone. You could put some soft (foam like) spacers between case and phone to ensure the battery sits securely in the phone.
If that still doesn't help, then I would recommend contacting the seller or MS and ask for a replacement.
good luck