This Apple ID has not yet been used with the App Store -
On a Mac;
Open the Music app
Choose the iTunes Store
Choose Account in the Music Quick Links on the right side of the store window
Sign in to your Apple ID
Add a payment method to your account details
On an iOS device;
Open the Settings app
Chose your Apple ID
Choose Payment & Shipping
Add a payment method to your account details
M1 Mac mini, macOS 12.6; Watch, series 7 GPS/cellular, watchOS 9; iPad Pro 2nd Gen, iPadOS 15.6; iPhone 12 Pro, iOS 16; TV 4th Gen, tvOS 16; HomePods, audioOS 16 and Airport Express w/ Airplay 2