My minecraft turns out my Wi-Fi. How do I fix it?

I used to play on my old computer minecraft, just fine, kind of laggy, so recently bought a new computer and this works just fine. But whenever I turn on minecraft, after a couple of minutes, my modem restarts as if I had disconnected it and connected it.
It can't be the Wi-Fi for it works fine with the other cp

Is your new computer a laptop because you have to make the wireless a permanent connection. All Laptops by default are Limited Access. You have a connection and then you don't like a Yo Yo.