I am very sorry for your loss. If your child died during 2021, you are still allowed to claim him as a dependent, as long as he lived in your home more than half the nights of the year while he was alive, was under age 19 (or a full time student under age 24), and did not earn more than half his own financial support. You would answer in Turbotax that they lived with you "all year".
If your child died during 2020, you can remove them from the list of dependents by clicking the Personal tab, then click "review" on the dependent section, and click the delete or trashcan icon next to the dependent's name in the list of dependents.
Assuming you are filing a joint return and your son passed in 2021, and assuming he would otherwise qualify as your dependent, you can claim him as a dependent for the entire year, regardless of the date of his passing.