Two-dimensional materials under electron irradiation