In October 1915, Einstein threw himself into a month-long frantic endeavor in which he returned to an earlier mathematical strategy and wrestled with equations, proofs, corrections and updates.
Einstein discovered to his horror that Hilbert had taken what he had learned from Einstein's lectures and was racing to come up with the correct equations first.
The discovery of the expansion of our Universe was already noticed by astronomer Hubble a long time ago in 1929, forcing Einstein to revise his famous equations about space, time and masses.