On Jan 2nd you realize a loss of $1. When you buy the share back on Jan 3rd, you create a wash sale and the $1 loss deduction is disallowed (temporarily) and must be carried forward.
The disallowed loss is added to the cost of the replacement share and when you sell on Jan 4th, you realize the $2 loss, for tax purposes.
All of this just means that it's an accounting exercise as long as the wash sale violation shares are sold in the same tax year. IOW, instead of -1 -1 = -2, it's 0 -2 = -2. Same result just different bookkeeping.
If instead the first realized loss and replacement share purchase occurs in December of 2020 but you sell the second position in January of 2021, you do not get the deduction for 2020 and you get to deduct all of it in 2021.
Here's a good explanation of the wash sale rule.