Please read the Forum guidelines How to get the best out of this forum - Using Arduino / Programming Questions - Arduino Forum. Format your code using the arduino IDE and T and then paste it using code tags - that way it is far easier for everyone to read and in a form we are all used to.
What sort of Arduinos are you using, and are you using an ESP32 as the Access Point for both?