In the current digital era, the way Generation Z interacts with social media, particularly in vibrant cities like Shanghai, is significant and varied. This study, influenced by Bandura's Social Cognitive Theory (SCT), investigates the detailed motivations behind Generation Z's online behavior and examines how these motivations might relate to the risk of becoming addicted to social media. We carefully gathered data from 318 participants, mainly aged 22 to 28, from various socio-cultural backgrounds in Shanghai. Using SPSS for detailed analysis, we applied descriptive statistics and Pearson correlation analyses to identify patterns and relationships. The initial results show that Generation Z in Shanghai is heavily involved in the digital world, and their social media use aligns with the principles of SCT, including observational learning, reciprocal determinism, and self-efficacy. This study adds to the growing body of research on digital behavior, emphasizing the importance of understanding the complex effects of social media on individual lives and society as a whole.