Neither.
The oldest known noodles, about 4,000 years old, were found in China. East Asian noodles appear to have developed on the mainland, rather than in Japan. East Asian noodles don't appear to be ancestral to Italian pasta - that appears to descend from itriyya, spaghetti or vermicelli made from semolina in the Syria-Palestine region in the 9th century (if not earlier).
More on this in https://www.reddit.com/r/AskHistorians/comments/ee0vrm/what_is_the_origin_of_pasta/