There can be several reasons why your iPhone gets stuck on the Apple logo like iPhone jailbreak, iOS update failed, while recovering data from backup, hardware problems, deleting some iOS files, etc.
You can solve the problem by restarting the iPhone, doing a hard reset, or putting the device into recovery mode. Remember that hard reset leads to complete data loss from your iPhone. You can recover lost data from backup, or resort to iPhone data recovery solution. Read more