iTunes sometimes doesn't recognize connected device
Apple has two articles to cover this - one for iTunes on Windows OS and the other for iTunes on Mac OS:


https://support.apple.com/HT204095#PC - iPhone, iPad, or iPod not recognized in iTunes for Windows PC
https://support.apple.com/HT204095#Mac - iPhone, iPad, or iPod not recognized in iTunes for Mac


Both start with If your iPhone, iPad or iPod won't connect to iTunes on your PC, try the steps below. Just follow the guide for your OS and consider asking a follow-on question if you get stuck with a specific step. Be sure to list the versions of OS and iTunes in that post as those details will help us help you.