Per US law, the interest on foreign accounts is taxable when it accrues.
If you withdraw early and pay a penalty, that is an adjustment on your US tax return. See here for how the adjustment is made if you have a 1099-INT from a US bank. The adjustment is similar with an account that does not issue a 1099-INT, but would require a couple extra steps to enter it.
https://ttlc.intuit.com/community/retirement/discussion/how-do-i-declare-an-early-withdrawal-penalty...