How can I buffer and aggregate multiple rapid-fire messages from a single user into one consolidated input before my workflow sends a reply?

this is my implemented logic but it is not working, can anyone suggest a better logic or alternative way to do this task please.