When you buy a game on any launcher, you technically do not own the game (this is true for Epic Games and Steam). You own a license to the files and to run the game. Some games will check that this license exists (DRM among just needing to connect to a server). You cannot share or transfer this license, i.e you are the owner of the platform you and thereby you can only play on it.
Some games do not have DRM, thus there is no way to check that it bought through Steam or Epic Games. At this point, you just have the .exe (or .dmg) file and its assets, and you can still be able to play even if you don’t have Steam or Epic installed. Most games on Epic have DRM or an Internet requirement, so there’s no real way to bypass the method.
Do your research before buying and if you are not accustomed to buying online games from Steam or Epic Games, then buy physical copies of the game, and still, you can connect other accounts together.
Follow up the steps to link Steam to your Epic Games account:
Step 1: Sign in to your account and Sign Up if you do not have one.
Step 2: Go to you Profile.
Step 3: Head on to the Connections section.
Step 4: Tap on the Connect Button.
You will be redirected to a page to Link your Steam Account like the image down below.
Step 5: Click on Link Account
Now, you will be redirected to the steam to enter your Username and Password.
Step 6: Click on Sign In.
At times, it may or may not give a message for verification purpose.
If it comes, an ID will be sent to your mail ID, enter the ID and click on Submit.
Step 7:Bingo! Your Steam is connected to your Epic Games account.
You can see the image down below.
So, now you can enjoy your games without much thinking about the platform.