Here's a simple but extremely effective technique to generate creativity:
Work hard on a problem until you reach an impasse.
Take an extended break from the problem (it could be a week or up to a few months, it's your call).
Repeat
IFor creativty, Take Breaks - Article
And a piece of historical evidence to consider:
When Isaac Newton was typing this up just as Joseph O'Rourke posted his similar answerforced to return home from school due to the Black Plague, he began to generate vast swaths of groundbreaking ideas including laying the foundation for classical mechanics and calculus. Hopefully this helps youHis productivity lasted for decades.