It is true that the word "Afterwards" may be omitted from your sentence without it losing the intended meaning. If you prefer to use the word "Afterwards", you may still use the word "upon" while keeping the sentence grammatically correct. The word "on", however, is grammatically incorrect.
The word "on" is sometimes confused for a synonym of "upon" because in some cases, "upon" may be used in its stead to formalize a sentence. An example of such cases would be the sentence "I insist on paying for your dinner". A more formal version of this sentence would be "I insist upon paying for your dinner".
Alas, in your case, the word "upon" means "immediately after". The word "on" cannot take this meaning, and can therefore not be used in your sentence.
If the usage of the word "upon" still troubles you, you could omit it by using a sentence like:
Afterwards, the script is executed, the solver is compiled, and new dependency list files are generated.
This sentence can be a little bit clunky as well due to the excess of commas, so I would like to suggest the usage of the word "upon", but this sentence is perfectly correct as well.
I hope this helps you in wording your sentence!