The problem is that Arduino Opta doesn't have the eeprom hardware, so the EEPROM.h library (from which the EEPROM.read and EEPROM.write functions are taken) isn't available for the Opta board.
The Arduino Support answered me:
The Arduino Opta shares the same microcontroller as the Portenta H7.