>>17165018
I'd recommend a Japan Rail Pass. It's like Inter-rail for Japan. You get to use all JR-trains, except the commuter shinkansen (Nozomi and Mizuho). They cost from ~250$ to 550$, for 7 to 21 days. There are also regional variations and the seishun-18 ticket.
Last time I went, in 2015, I budgeted around 10 000 yen per day for food and accommodations, but you can get by with considerably less than that, especially if you use hostels, ABnB, and don't splurge on food and drinks.