You can use different Apple ID accounts for iCloud and App Store on your iPhone and iPad.
If you need to change the Apple ID you are using in the App Store without wanting to change the Apple ID for iCloud account on your iPhone, here’s how you can do it.
Changing Apple ID for App Store from iPhone Settings
Open the Settings on your iPhone.
Scroll down to the iTunes & App Store option.
Tap on the Apple ID displayed at the very top of the screen.
A pop-up menu will open. Choose Sign Out and you will be signed out of the current Apple ID from the App Store.
Without going back, tap on Sign In in the same menu where Apple ID information used to be and enter the login details to sign in using a different ID into the App Store.
This will change the the Apple ID for App Store while the Apple ID you were previously using for iCloud will remain the same.
Changing Apple ID directly from the App Store
You can also change the Apple ID directly from the App Store. To do so, open the App Store and tap on your profile icon/avatar at the upper-right corner of the screen.
Then, scroll down to the very end of the menu that will open and tap the ‘Sign Out’ button.
After you have signed out from the previous account, you can Sign in into the App Store using a new ID from the App Store itself.