What happens to a galaxy when a black hole is formed within it?
They collide causing a space time shattering event, depending on size.
If its a supermassive black hole, in example, the one in the middle of the Milkway, then the two would start pulling everything in the galaxy towards them. And very slowly start pulling towards each other until they collide. (Predicted by Einstein)
If it's smaller a similar thing would happen, but much much slower. Here is an amazing article that you can check out with tons of information.