People's attitudes are determined more by their immediate situation or surroundings than by society as a whole.
It is debatable whether people's thoughts and demeanors are impacted more by current milieu or society as a whole. Imminent situations do have some influence on people's attitudes; however, it is society as a whole that shapes people on a long term.
To begin with, immediate surroundings can have a huge impact if the situation itself affects numerous people. Due to the sudden change, people's stances can change rapidly. Fukushima accident cogently shows how immediate surrounding can engender drastic transformation in people's attitudes. There was a serious radioactive water leakage due to high magnitude of earthquake and tsunami in Japan. The leakage is very harmful, almost lethal to living creatures including humans. After this incident, plane tickets and hotel fees for tourists have radically dropped since a lot of people refuse to visit Japan because of the potential harm on their body. Japan used to be one of the most popular nations among tourists, but now, its heyday has passed due to the nuclear accident; the country became much less attractive to people now compared to the past.
Nonetheless, society as a whole is still a crucial factor in determining people's thoughts. People's thoughts and stances vary as the society go through different phases and changes. For example, youtubers' status has increased incredibly over the past several decades; the job was once not even considered as a real job, but because the society transformed steadily and continuously, demands on internet and Youtube as a platform for video creators have increased. People consider the career more seriously than before. Another example is attitudes toward LGBT community. After the law passed regarding same sex marriage in the United States, it yielded a huge impact worldwide. Although it seems like recent situations have brought changes, it is not; both instances, especially same sex marriage was issues of societies for a long time, and after slow and gradual process, both incidents happened and people's attitudes changed even from before. Thus, society as whole rather than immediate situations mold people's thought process.
All in all, even though imminent surroundings can sometimes drastically transform and impact people's attitudes, it is prolonged societal issues and features that shape people's thoughts and behaviors on the long term.