Q Should I lock in losses for a stock Im bagholding to offset short term realized gains stocks

This is my first year actively trading, I have bought and sold multiple times, and am up for the year. I am, however, holding a stock at ~20% down from my purchase price. Should I sell that stock, realize the loss, then re-buy in the new year? My hope would be that the capital loss would offset some of my realized gains, and I can then re-enter my position in the new year.

Wrong. Wash sale rules prevents people from doing this.