Sunan Ibn-e-Majah 4032 And Free Mixing In Islam
This is the hadith you referred to. “The believer who mixes with people and bears their annoyance with patience will have a greater reward than the believer who does not mix with people and does not put up with their annoyance.” It means one should keep interacting with people despite having bad experiences. One should not avoid social life.