With respect to closing costs for the buyer and the list of same (appearing in various places), you can add the costs outlined to your basis provided you actually paid them.
If the seller paid the costs, you cannot add them to your basis.
https://www.irs.gov/publications/p530#en_US_2021_publink100011939
Items added to basis.
You can include in your basis the settlement fees and closing costs you paid for buying your home. A fee is for buying the home if you would have had to pay it even if you paid cash for the home.