Network resets works sometimes and sometimes it don't
Wipe cache partition:
1) Turn off the device.
2) Press and hold the Volume Up key and the Bixby key, then press and hold the Power key.
3) When the Android logo displays, release all three keys.
4) An 'Installing system update' message will show for some seconds before the Android system recovery menu options appear.
5) Press the Volume down key several times to highlight wipe cache partition.
6) Press Power key to select.
7) Press the Volume down key to highlight yes, them and press the Power key to select.
8) When the wipe cache partition is complete, Reboot system now is highlighted.
9) Press the Power key to restart the device.
Just to clarify are you unable to use hotspot when you are on Wi-Fi or are you unable to use Wi-Fi and Hotspot completely?
Long press on your WiFi wiget
Click on advanced
Click on Manage Networks
Long press all of them(again: all) and forget
Clear all the saved networks
Try to connect you the AP your trying to again.