Surface defect, anomalies and b-extremization