Hi ifaaa,
If the app has a cloud icon next it on your device Home Screen or App Library, that typically indicates it was offloaded from your device to free up storage. This is further described in How to check the storage on your iPhone and iPad. If you see this icon in the App Store, that indicates your account previously downloaded or purchased the app.
In either case, If you can’t download or update apps on your iPhone or iPad offers steps to try if an app won't download or install:
"1. Manually update the app
Learn how to manually update an app
2. Add a payment method
You might need to have a valid payment method on file, even if the app that you want to download is free.
Add a payment method
3. Resolve a problem with your payment method
If your payment method is expired, declined, or failed, or a message says 'billing problem with previous purchase'
4. Prioritize the download
From the Home Screen, touch and hold the app. From the menu that appears, choose Prioritize Download.
5. Restart your device
Restart your iPhone or iPad, then check to see if you can download or update apps.
Restart your iPhone
Restart your iPad
If you still can't download or update apps
Contact Apple Support"
Regards.