i dont know how to use a keypad n lcd with eeprom

           if(tecla)
            {
              numero[indice]=tecla;
              indice++;
              posX++;
              lcd.setCursor(posX, 1);
              lcd.print(tecla);       
            }

Even if the user has pressed 23 different keys, keep writing beyond the end of the array...

You REALLY need to make sure that there is room in the array BEFORE you write to it.

with * a number that you enter is deleted.

     case '*':                     //La tecla B sirve para borrar el caracter anterior escrito
     
        lcd.setCursor(0, 1);
        lcd.clear();
        break;

Just erasing what was on the LCD is nowhere near enough. Remember the array you are storing data in? That needs to be cleared, too. Remember the index into that array? That needs to be reset to 0, too.

      case '#':                     //La tecla C borra TODO lo escrito en la pantalla y posiciona el cursor en (0,0)
       
        EEPROM.write(eepromcaja1,indice);// Escribimos en la memoria eeprom
        menu=0;
        lcd.clear();
      
        break;

Storing the array index in EEPROM seems like a dumb thing to do. Storing the data in the array seems more useful. YMMV.