How can I build the wall if the Game doesnt gimme time necesary to collect enought materials
It usually does, you might just need to rethink your strategy. Two things to consider; moving workers around, and work modes. Try moving villagers away from the farm or market and putting them to work in the mines or lumber yard and just coast for a bit until you can build the wall. If you start getting pressed for time, run the miners or lumber yard workers for a couple months.
Early game tends to reward more conservative strategies in regards to constructing new buildings.