Was it lazy writing in the Avengers 20 minutes earlier when he was lying to them?
Not at all.
"They needed a push." There was a
purpose for him lying about that.
What would be the purpose of Fury lying to these heroes about Carol? The Avengers aren't SHIELD, and as far as we know, Fury didn't have a reason to even withhold that information from SHIELD at that point since he didn't know about HYDRA's infiltration. If he withheld the information about Captain Marvel from everyone for all of this time, then why go on about how "hilariously outgunned" Earth is in 2012? Dude was on a freakin' spaceship before the first Thor movie happened; was able to see firsthand what the Kree was capable of doing. And no, "Captain Marvel has our back" is obviously not a good excuse for that, since she effed off in space and had no intention of coming back to Earth unless Fury called her.
The fact of the matter is that Marvel Studios had not planned a Captain Marvel movie back in 2012, and they wanted to shoehorn her into the final Avengers movie. In a sad attempt to not make it feel so shoehorned, they gave her a solo movie set in the past to give the illusion that "she was here this entire time!"
Lazy. Writing.
I'm a big fan of the MCU-- it's my favorite movie saga/franchise of all time. But the Captain Marvel movie wasn't it, chief. It's the only MCU movie that I flat-out hate.
EDIT: Just realized you were probably talking about Fury lying about SHIELD making weapons with the Tesseract. He still had a reason to lie to the Avengers about that. My point still stands. He knew that they wouldn't help him if he had told them the entire truth ... Especially Banner, Stark, and Cap (and it is
perfectly established in their Phase I solo movies as to why they wouldn't have helped if they had known from the get-go). Literally, in the argument the entire group was having before things hit the fan on the Helicarrier, the Avengers voiced their dismay about the thought of helping SHIELD making weapons of mass destruction with the Cube.