Create config fille for wifi ssid and password

Hey,

how can I make a config where is included the ssid and password for esp32? And how can i then implement it into code?

how can I make a config where is included the ssid and password for esp32?

With a text editor.

And how can i then implement it into code?

With a #include statement.

the esp32 remembers the last used values. it will use them to connect right after boot

The WiFiManager library provides a very nice method for the user to configure SSID, password, and any other parameters you like via a web page:

It doesn't currently have official support for the ESP32, but there is beta stage support for it in the development branch of the library:
https://github.com/tzapu/WiFiManager/archive/development.zip

Even if you don't use the library, it might provide a nice demonstration of how this sort of thing can be done in your own code.