As it stands, both sentences aren't correct because they are missing some articles. The tense of the verb 'use' has nothing to with this, though these kind of sentence are usually phrased in the present simple. And the use of 'before' is correct; it is used in a spatial sense ('in front of') rather than a temporal one ('earlier than').
The use of with here isn't really common; I feel that for and before are the best prepositions here.
In a compound noun, we don't use a determiner for both nouns.
In a compound noun, we don't use a determiner before each noun.
Even more clear would be to say:
In a compound noun, we only use a determiner before the first noun.
The online grammar tool interprets that the second sentence is wrong
This is probably because you use the perfect form (used), which is appropriate after haven't but not after don't. In general, one should not rely on grammar tools.