Galaxies can merge without their stars colliding
If the Milky Way and Andromeda eventually merge, individual stars would still be extremely unlikely to collide. Galaxies contain enormous amounts of empty space, so their stars can pass through one another’s systems even as the galaxies combine.