Most of the time this problem is Windows 10 power saving but it is simple to disable...
If you open control panel and then select 'Network & Internet'
Then select 'Network and sharing center'
Then select 'Change adapter settings' which will show you a list of your network connections
Right click on the one corresponding to your wifi and select 'properties'
Click the 'Configure' button
Select the 'Power management' tab and untick 'Allow the computer to turn off this device to save power' and click the 'Ok' button to finish
If this isnt straightforward for you then let me know and I will add screenshots