My internet keeps disconnecting on certain programs?

For the past 2 weeks i have been facing a problem with my internet, it keeps disconnecting on certain programs. On steam, every 15-20 minutes it will go offline and i won't be able to connect to any game server or talk to friends (same with origin) and on the game minecraft i won't be able to connect to any multiplayer servers. This problem has been making me quite mad recently and i have found no way to fix it. If someone could please help me it would be very appreciated. (I own a desktop that uses Ethernet, and the desktop is almost brand-new).

Do you have a cable or DSL internet? If you have a DSL internet, it may be a problem with your modem or the signal it is getting from the service provider.