The 2000 Accord sedan is 2,712lbs, not 2,987lbs (which would be the wagon).
The 2019 Civic sedan is 2,743–2,923lbs depending on equipment/trim.
So yes, the Civic compared to an older car of similar size did get heavier.
The Miata proves that cars don't have to be heavier, but the Miata also took advantage of much more aluminum compared to the older models. Maybe mainstream cars should also switch to use more aluminum to keep weight down, and you're right that the reason they don't is because oil is cheap enough where weight isn't a priority enough to use more expensive aluminum instead of steel.