Sorry, I'm kind of a lurker and don't check replies often. I'm by no means an expert on Linux, the Deck or even Windows.. thsi is just my coarse understanding of how it works.
A prefix is a directory structure containing a sort of pseudo windows environment that is created for each Windows game that you are running through proton. The prefix contains a lot of the dlls windows needs to run (or versions of them anyway.. the proton versions of these files translate api calls in windows to their linux equivalents, in so far as i understand). Also Valve has tried to include as many "redistributables" as possible to provide the environment needed for games to run. For example, directX (various versions) and certain video codecs and the like.
Bu some, due to licensing, are not able to be distributed by Valve themselves and occasionally, will need to be manually run by the end user.
Prefixes mostly are a huge collection of symbolic links so that the entirety of Windows is not being installed over and over again taking up huge amounts of space. Changing proton versions just changes all of the links to the versions of the files matching which version of proton you are using. Each version of proton itself has the actual files that are being linked to. Files not present in the base proton package that the game installs are written directly into the prefix... save files, other redistributables needed that are installed with the game... etc.
When launching a non steam windows game, if you don't specify a prefix folder specifically for the non-steam windows game you are running, then Steam will create a new prefix folder automatically but it may not have everything that it needs to run properly. Heroic Launcher creates the specific prefixes relevant to the game you are installing.
Either launching through Heroic Games Launcher itself or using the HeroicBashLauncher script to add to steam seems to create/use a launch script which specifies the correct prefix located by default in /home/deck/games/heroic
https://github.com/redromnon/HeroicBashLauncher If you use BOILR on the other hand, as far as I can tell.. just adds the game's executable to steam without a launch script that tells steam where the prefix generated by heroic games launcher is and lets steam create a new generic steam prefix in steam's folder under steamapps. Steam then assigns a random number string as the prefix folder name, making it hard to identify unless using a tool like protontricks. Unless I've misunderstood what BOILR is doing, I would recommend HeroicBashLauncher over BOILR.
edited: for clarity.