Is investment interest deductible in year it's charged or year it's paid?

I invested the proceeds of a promissory note and now intend to deduct the interest expense as investment interest.  I accrued interest for a few months in 2019 but I didn't start paying any of it until 2020.  Is the interest tax deductible when it is accrued or when it is paid?  Thank you.