I bought iPhone XS Max I didn’t know the phone has Apple ID so how can I remove the Apple ID in my divice
If you can't reach the previous owner whose ID is on the device and have them remove the device from their account, the device is worthless. Apple won't unlock it for you.
Turn off Activation Lock - Apple Support.
"Apple ID password: I bought iPhone XS Max I didn’t know the phone has Apple ID so how can I remove the Apple ID in my divice"
Perform a Return:
So, just where as this purchased? Try returning it. If you purchased it off of a web site (i.e. eBay), then contact them, seeing if the seller can be held accountable, and if you can get your money back.