This example demonstrates how the chemnum package can be used to automatically number compounds in reaction schemes created with ChemDraw (saved as .eps files). While the chemstyle/chemscheme package can also be used, its author recommends the use of chemnum as it's deemed to be clearer.
Ideally, the ChemDraw-generated .eps files should contain "TMP1", "TMP2" etc as temporary markers, which will then be replaced with automatically incrementing compound counters using the \replacecmpd command. Set your Overleaf project's compiler to be LaTeX (required for .eps images) when using this method.
LianTze Lim (Overleaf)