I accidentally deleted the application folder, but have now put it back, however, after deleting the application folder, "a few vertical lines" has replaced the location on dock (picture attached). Could someone please help?
That's just the separator between apps and stacks/folders in the dock. That's always been there and you can't remove it. Your app stack is below your document stack.