The Tax Cuts and Jobs Act (TCJA) of 2017 initially suspended the deduction for miscellaneous itemized deductions, including tax preparation fees; however the newly signed One Big Beautiful Bill Act (OBBBA) made this suspension permanent.
Self-employed taxpayers can still write off their tax prep fees as a business expense by reporting them on a Schedule C.