There are several aspects to consider but the main one is simple. Don't take Social Security if you are still creating income.
I started taking Soc Security when I was 65, though I was still working. I did so because the law changed to let me draw full Soc Security without penalty for earned income. Because I was still paying into Soc Security my benefit increased as a result. I worked for 2 1/2 years after I started taking Soc Security.