The correct way in which you should conduct yourself in public spaces in Japan is guided by unspoken rules that ensure a smooth experience for everyone.
For example, on trains, you will mostly never see people on the phone. If it’s absolutely necessary, you can step near the door and talk quietly, but it’s best to avoid. Eating on non-shinkansen trains (especially hot food) is considered impolite–one of the reasons being that the scent will fill up the entire car, which may be unpleasant for some people. It’s still not ideal but if you’re helplessly hungry, take a few bites of an onigiri (rice ball) or cold sandwich before riding the train on the platform, then put it away once onboard.
I know what you’re thinking…too many rules!! I totally understand but there’s no need to panic. Stay calm, and when in doubt, just follow the lead of the locals. The ability to read the room is also a very foundational aspect of the Japanese communication style, so you can have fun practicing that in group settings.