After World War II, the U.S. stepped in and helped them rebuild their economy and country infrastructure. The U.S. helped them make their current constitution that enabled Japan to have an economic boost. Nowadays, Japan makes most of the electronics and cars you see today.
I hope this answer helped you! If you have any further questions or concerns, feel free to ask! :)