if it's an app that can only be stored on the phone and not the SD then sometimes it continuously says pending. OneDrive can only be stored on the phone. Go to Storage Sense > Change where you store music, photos, app etc > Store new apps on my > phone
Try again. But if doesn't work press and hold the notice and then cancel downloading. Then try again.