Thank you for the explanation @code-queen and also @ahmadnasriya for the advice. The site is already working.
I still tried the distinct method for returning unique items, but the code doesn’t work. Wix SDK error: The selectOption parameter of an item at index 0 that is passed to the options method cannot be set to 2019-2020. It must be an object type.
I stayed with the original code.