The COVID-19 pandemic significantly impacted public health and quality of life, leading to government recommendations for vaccination. Using cross-sectional data from a nationwide population-based survey conducted in China (N = 6860), this study aimed to examine the associations between individual vaccine uptake and general trust in others, trust in government, and interaction with neighbors. We conducted a multilevel logistic regression analysis to examine the relevance of these factors at the individual and community levels. Among young adults, higher levels of general trust at both levels were positively associated with vaccination, with odds ratios (OR) of 1.35 (95% confidence interval [CI]: 1.07, 1.70) and 1.58 (95% CI: 1.14, 2.18), respectively. We also found a positive association between vaccination and community-level interaction with neighbors, with ORs of 1.55 (95% CI: 1.11, 2.17). In contrast, among older individuals, vaccination was positively associated only with individual-level interaction with neighbors, with an OR of 1.55 (95% CI: 1.15, 2.08). The results indicated that vaccine uptake was associated with an individual’s views of society and the social environment of the community, with substantial variations between the young and the old. Our findings emphasize the significance of public health measures to strengthen neighborhood interactions among older adults.