There may be a conflict with neighbouring wireless configurations. You could have a look at changing the wifi frequency of your router - whatever it is on , 1, 6, 11 seem to be recommended. To access your router you will need to type into the address bar at the top of your browser the IP address of your ISP - usually 192.168.1.1 or 1.2 or something similar. You will then have to put in your user name and password - if you haven't changed them they will probabably be admin/admin, or admin/password or admin/blank. Go into settings and find wifi channel.
Hands-on: Samsung Galaxy S8 review