Dear Portuguese_Tutor the use of WERE in the sentence you provided corresponds to one of the rare cases in English where the subjunctive mood is employed. In fact, the use of "WERE" can be used to denote a contrary to fact situation (like Portuguese's past subjuntive
-- Se um pradrão de tempo universal FOSSE (WERE) criado ..... ) OR
"If I were rich [contrary-to-fact] I would help the poor." <--Sujbunctive Mood
= "Se eu fosse rico, ajudaria os pobres".
Normally "WERE" is never used with the 1st person singular ("I") or 3rd-person singular ("he/she/it") EXCEPT when used in (i.e. to indicate) the subjunctive mood.
In the indicative mood, "were" can only be used with "you", "we", and "they", for "I" and "he/she/it" the form "was" is used.
When I WAS rich I used to help the poor. <-- Indicative Mood
In any case the wording of the sentence you inquired about is considered bombastic, awkward & archaic by most English speakers; a clearer way to denote the intent of that sentence would be as follows:
A world code should be created to reduce this senseless waste.