Chloe Grace Moretz has admitted she wanted to "hide" following her breakup with Brooklyn Beckham in 2016.