Let's examine your laser gun example by comparing it to a similar weapon that exists in the official rules: the musket. Now this comparison between future-tech and a musket might seem quaint--a laser gun, after all, is much more advanced than a musket--but a musket is so vastly more advanced than a longbow that a person that had never seen a firearm would probably be unable to tell the difference between the two. And indeed, if you consider the difference in strength between firearms and bows, you would be forgiven for thinking that the introduction of firearms into 5e would completely break the balance of the weapons.
However, this isn't the case with the musket. It deals 1d12 piercing damage, uses ammunition, and has the loading property... And it exists quite comfortably within the rules of 5e, without ever infringing on the strength of magic. Wizards are still quite comfortable taking Magic Missile, despite the existence of muskets. Fighters can still choose to use bows and arrows.
The key is that, like almost everything in 5e, the strength of a PC is not closely tied to the strength of their weapons, instead relying more on the gradual slope of increased proficiency bonuses and expanded roster of abilities. This is a consequence of the concept known as "bounded accuracy", the cornerstone of 5e balance.
Under 5e's class systems, Wizards want to use magic because all of their features are tied to magic. Similarly, a fighter wants to use physical weaponry because all of their features rely on physical weapons. The perceived strength of a weapon has no impact on these choices.
How does this relate to your overall question?
5e is strongly associated with Medieval and early Renaissance tropes, but beyond the names and descriptions of items, there isn't actually anything that strongly links the game mechanics to a particular "era" or state of technological advancement.
If you want a futuristic setting, you can and should reskin the existing elements into their futuristic counterparts. Even if you're using a playmat and miniatures, DnD is played within the mind, so it shouldn't make a difference whether it's half-orc swinging a sword or a Mandalorian slashing with a vibroblade. Make up your own reasons for why people can survive hits from a laser gun--for example, I'd imagine that armor has also significantly advanced in the future.
You should not, however, increase the strength of your weapons just because they're futuristic. This has a strong chance of breaking the balance of the game and will do little to actually enforce a feeling of futuristic combat.
If you want increased lethality, you might consider introduce rules to decrease the health of players and monsters, but you're probably better of following the variant rules for "Gritty Realism" on page 267 of the DMG.
If you want to use techno-magic elements for non-combat sequences, you might, as Jason_c_o pointed out, look at official WotC examples published in the sourcebooks for Eberron (Wayfinders Guide to Eberron and Eberron: Rising from the Last War), Guildmasters Guide to Ravnica, and Descent into Avernus.
Footnote: I'm aware of the existence of the laser pistol, laser rifle, and antimatter rifle in DMG. Unless you like the idea of any Extra Attack class single-handedly dominating every combat encounter by consistently dealing 64 necrotic damage every round, I would highly advise against incorporating them into your game. If you want to play 5e in a futuristic setting, you're much better off adapting the existing sandbox rather than using those options.