Web with two languages. The urls with the /es/ do not index


Good morning,

I have launched a website with English and Spanish languages. I’ve done it using WPML, but I’m having a lot of problems indexing and ranking the Spanish URLs, which appear in the URL the /es/.

Google Search Console is declaring all URLS like domain.com/en/whatever as “Duplicate, submitted URL not selected as canonical”

I really need these pages, despite being translations of the English version, to also index and rank keywords.

Any solutions? Thank you!