Sale of Equipment

I had heavy equipment what was to depreciated over 5 years. The equipment was sold in 2022. This was the 3rd year of the 5 years of depreciation schedule.  A newer piece of equipment was purchased to replace the older unit that was sold. How are these events handled for tax purposes? Thank you.