A pocket wifi is a small portable unit that contains a sim and which allows wifi connections to the unit, usually for up to 10 devices simultaneously. If you’re a solo traveler with a single iPhone, then a sim maybe an easier alternative; however, if you have more than one device or there’s more than one of you, than a pocket wifi is the way to go. It also has the advantage that you can leave your home sim in the phone so that people can reach you on that number if needs be.
There are various companies that rent them. You can arrange the rental before you leave home and pick it up at the airport in Japan (usually at a post office or convenience store) or have it delivered to your hotel etc. They come with a return envelope so you just drop it in the mail before you leave Japan. There are various companies - here’s one example -
iVideo. There are also rental shops at the airport but probably easier/quicker to arrange it before you leave home.