He bought 33 guns between October 2016 and October 2017.
Also it has been reported that he had over 200 financial transactions reported to FINCEN since 2014.
Those transactions are reported because the can be red flags for money laundering and/or terrorist financing.
One of the big questions is what set him off at that time. There had been several major terrorist attacks on concerts and public gatherings at that point, but I cant think of one particular thing that might have made him move from mathematical speculation to acquiring the weapons.
Also, I am sure he must have had help or had expected to have help in the actual attack.