Star clusters and black holes in galaxies across cosmic time