I have different last names on passport and local official identity, which one should I use for publication? I'll soon publish my first scientific journal but I encountered a problem.

I have two different last names in which both are official. For example: in my national identity card (as well as my birth certificate, school certificate up to university) my name is John Adam. However in my passport, I put an additional word so my name became John Adam Levine. I took a double degree program and when I'm abroad doing research this is the name I used (also for school certificate) and the research is about to be published.

Which name should I use for publication? I heard that it's okay as long as it is consistent, but I wonder if I will get into trouble for it someday. Preferably I'd like to use the first one because the only reason I put the third word is because I need it to go to a certain country, however I'm concerned because this is the name I used for my abroad school certificate.

I'm now really desperate because I have to decide soon. Any advise or similar experience will be helpful

Thank You!
From a practical perspective: you might also want to consider to check a major publication database of your field and see, if one of the two possibilities / names has not been used by another researcher. This might become useful once people look for your publications.