In simple terms, a precursor (n) is something that happened or was developed before a second thing.
Usually, one of the prepositions 'to or of' will be more appropriate than the other, however, in this case, either one can be used.
In most cases the preposition 'of' is used, e.g.:
- Chemical X is the precursor of chemical Y.
- Cholesterol is a precursor of testosterone..
- Today I saw the first robin (bird) and that is a precursor of the coming spring.