The original prototype for Wordle was actually back in 2013 [0]. But yeah he didn't really touch it until mid 2021 when he recreated it from scratch. The improved word list which plays a huge role came then, with the help of his partner classifying all 13k 5-letter words. I believe the share function came much later when he noticed people actually manually typing those colored squares.
Dating back since 2013.
So, while it could be created in a short timeframe. A lot of experience/thinking went into it.
Edit: changed 2016 to 2013