Hello Puputhebest.
Thanks for asking the Apple Support Communities for help with your iPhone Wi-Fi grayed out.
1. Please verify your device is updated to the highest iOS available: Update your iPhone, iPad, or iPod touch - Apple Support
2. Once updated, ensure you tried to reset Network settings one more time as describe here: If your iPhone, iPad, or iPod touch won’t connect to a Wi-Fi network - Apple Support
3. If the issue remains, the only option is to set up a repair for the device. Please review this help article and make a recent backup prior to sending your device to get repaired: Get your iPhone, iPad, or iPod touch ready for service - Apple Support
Price will depend on your warranty status as described in the article above. Use this link to start your repair: iPhone Other Repair - Apple
Thanks and have a wonderful day.