  We investigate the influence of the environment on the evolution of barred
and unbarred disc galaxies with a mass $>10^{10}\Msun$ from z=1 down to z=0,
employing the TNG50 magnetic-hydrodynamical simulation. We find that 49% of z=1
disc galaxies undergoes a morphological transformation, transitioning into
either a lenticular or spheroidal, while the other 51% retains the massive
disc. The morphological alteration is mostly influenced by the environment.
Lenticular and spheroidal galaxies tend to exist in denser environments and
have more frequent mergers compared to disc galaxies. We find that over half of
the barred galaxies (60.2%) retain the bar structure and have experienced fewer
mergers compared to those galaxies that lose their bars (5.6%). These latter
ones start with weaker and shorter bars at z=1 influenced by tidal interactions
and are frequently observed in more populated areas. Additionally, our study
reveals that less than 20% of unbarred galaxies will never develop a bar and
exhibit the quietest merger history. Unbarred galaxies that experience bar
formation after z=1 exhibit more frequent instances of merging events.
Furthermore, tidal interactions with a close companion may account for bar
formation in at least one-third of the cases. Our findings highlight that
stable bars are prevalent in disc galaxies. Bar evolution may nonetheless be
affected by the environment. Interactions with nearby companions or tidal
forces caused by mergers have the capacity to disrupt the disc. This
perturbance may materialise as the dissolution of the bar, the formation of a
bar, or, in its most severe form, the complete destruction of the disc,
resulting in morphological transformation. Bars that are weak and short at z=1
and undergo major or minor mergers may eventually dissolve, whereas unbarred
galaxies that enter crowded environments or experience a merger may develop a
bar.
