If you have not taken a backup previously, you need to use data recovery software for the iPhone to recover data.