I can't find hostapd.conf & wpa_supplicant.conf

I built an image with wpa_supplicant and hostapd but configuration files missing (hostapd.conf & wpa_supplicant.conf).
Also the script hostapd.sh didn't generate any file

They're typically created in /var/run/


root@OpenWrt:/# find . -name *hostapd* -print

yes (/var is a symlink to /tmp)

root@jj:~# find / -name *hostapd* -print

Maybe you left out other critical bits in your build, such as the appropriate kmod or iw.

it looks like it appears just when i configure an access point or connecting to an ap

The UCI system generates them dynamically by parsing the /etc/config/wireless file when wifi is started up. This is done by the script /lib/netifd/hostapd.sh. After the .conf files are written to RAM disk, wpad is started pointing to those files.

If you don't have any STA interfaces configured there won't be a wpa-supplicant conf file or an instance of wpa-supplicant. Same for APs and hostapd.