Flat Bands in Crystalline or Moiré Materials: From Topology to Electron-Electron Interactions