Either one, IMO. Japan's deadline is first, and you can even do it now, if you have all the paperwork and can do it on your own.
For older folks (me), the local tax office has had an early assisted filing period, which opens (IIRC) the week before their doors open for the regular 'season'. With the LINE app I've been able to reserve a slot during that week for the last couple years, a pandemic-related thing, I suppose, along with catering somewhat to pensioners. ((It's not an actual appointment, but you get a 30-min window to line up with at least a limited number of others, and be admitted into processing in batches. It's busy, but definitely not the crowded zoo of the normal filing period, and parking is easy, compared to waiting an hour+ for that during the regular time.))
Instead of trying to claim US taxes paid for the same tax year when filing here, I will be claiming (e.g.) US tax payments paid during 2022 (which in reality are for 2021 US taxes) on my j-tax return for 2022--and
not going back to amend the j-tax forms for 2021. I've talked about this several times with the tax office, and they seem perfectly okay with it.
One quirk with this is as follows. In April (or later if using an extension), say I owe $500 to the US, and so write a check to include with my return. Maybe the check is dated (e.g.) April 15th. Later, when looking at whether and when it has cleared, that date might be July 15th. So which date to use for the f/x conversion? When this has happened, I've taken in the converted yen amounts for both dates, and they've chosen the earlier one, the date that I wrote the check.
One other thing to keep in mind is japan does not use an overall/global $>¥ conversion figure for a tax year (such as given yearly on the IRS site). I'm pretty sure that for each SS payment, and each pension payment, you'll need to get the TTM rate for each specific payment date,
http://www.murc-kawasesouba.jp/fx/past_3month.php , then total the converted amounts in yen to show what you 'actually' received.