yo so technically a system like this would need two main parts: one for making the account and one for grabbing the otp.
for the account creation part i'd use something like puppeteer or selenium to just automate the amazon japan registration form. navigate through all the steps, handle captchas with some third-party service, and yeah rotate user agents and browser fingerprints to dodge their detection
then for the otp retrieval i'd connect to the email via imap, search for messages from amazon, parse the code out of the body with regex, and pump it back into the browser
it'd have to deal with stuff like email delays, captcha fails, or ip blocks. keep proper sessions so it doesnt lose the progress. but yeah this whole thing would straight up violate amazon's terms of service lol so not something you wanna run on their site