Usually this problem occurs (loss of the on-board usb serial adapter) happens when the power rails are abused somehow. For some reason the official 16u2-as-serial-adapter parts are particularly vulnerable to hardware feailure in this case (it is much harder to take out the serial adapter on the cheap clones, which use CH340 adapters - those can be thrown down a flight of stairs (electrically speaking) and land on their feet, and most other dedicated serial adapters are also quite durable. But there's something about either the 16u2 or the power supply circuit, particularly when an external voltage is used through the on-board regulator. My intuition and constraints derived from case reports, suggests that what is the proximate cause of this problem is involves the fault condition where Vdd >= VUSB while USB is connected. And Vdd can be pulled above that voltage through the protection diodes if somehow a voltage of >5v is applied to one or more external pins (beware of sneak paths between the power supplies that can lead to ground of two circuits being not isolated, but indirectly connected and at different potentials, leading to what tests as <5v and > Gnd in reference to it's own ground being outside that range when considering the relative potential of ground; For example, consider two circuits powered by two power supplies both at 5v, But they have different internal topologies, and their grounds are coupled in some way to the input power (modern SMPS AC-DC supplies provide an isolated DC supply, but other supplies may not. If you're unfortunate, you will occasionally see this to disastrous effect when you connect the scope probe ground and it's earthed, while the ground you just connected to is neither fully isolated nor earthed. The potentials are different enough that high current flows. Smoke comes from the insulation of the ground connector of the scope probe. Profanities are exclaimed. Outside your lab, it starts raining frogs, then blood, and then with a bolt of technicolor lightning, the dead rise from their graves to reclaim the world from the living. Preventing such unwanted effects is why one essential part of the more sophisticated electronics workbench is an isolation transformer that can be used to convert mains power, where individual outlets are not isolated, into an an AC supply of voltage equal to the input, but which is galvanically isolated, with as little coupling as possible between the input and output, which closes this sneak path. My father routinely brags of the particularly nice one he has with only a few picofarads of coupling between the input and output that he says "floats like a cloud"; he's got a workshop with more area than the entire apartment that myself and two roommates share, comprising a machine shop (16 and 10 inch southbend non-CNC lathes, and a bridgeport non-CNC mill, all tricked out with VFD speed control and 3-phase motors, and a DRO, large bandsaw, nice drill press, and for sheetmetal, a large bending break, corner notcher and shear), an electronics bench with multiple digital and analog scopes, spectrum and network analyzer, precision voltage, current,inductance and capacitance measuring equipment, temperature controlled voltage references, and more, a table saw, router, planer, and chopsaw for wood in the garage, two oxy-acetylene cutting torches, MIG and TIG welding, and, oh, a small and rarely used chemistry lab in what my mother used to call the laundry room, complete with a reasonable assortment of common reagents, provided they don't have short shelf lives precluding longterm storage. Some highlights include conc. HNO3, H2SO4, white and phosphorus, metallic potassium and other metals that need to be stored under oil. Even Thallium metal (so we can make the 6-component eutectic alloy that melts in hot water and is liquid down to temperatures low enough that it's not painful to say, cast your fingerprint in. Though you'd best wash the finger thoroughly afterwards, as two of those components are highly toxic, thallium and cadmium and the slightly toxic (relative to those two) lead. I've made the 4 and 5 component eutectic fusaible alloys, one of which you can cast your finger print in though it's painfully hot, but doesn't burn you, but never had the balls to add the 2% thallium to get the 6-component one. The alloys are SnBiInPbCdTh The first three nontoxic ones at eutectic ratio melt in very hot water, and adding each of the last three increasingly toxic ones and adjusting the ratios drops the melting point even further - I've also got a pile of gallium, and during the 2007-9 commodity peak, the chunk of indium we have was worth a few grand (this was as LCDs drove the stake through the heart of CRTs, driving demand for indium to unprecedented levels, before more copper and zinc mines started extracting it from their tailings since it was now profitable to do so (even though indium - and gallium - isn't particularly rare, it doesn't form concentrated minerals, so you can'd find a "rich vein of indium ore" and open an indium mine, all you can do is extract it from the waste produced from extracting other metals); obviously we got that indium before the LCD revolution, when it was well below the price of silver. Then silver prices increased several times over while indium prices rose to THREE TIMES that of silver, experiencing several dramatic peaks and troughs in little over a decade. Currently indium is again well below silver, though this is partly because monetary and speculative demand for silver as an investment has steadily driven up the price. Indium in contrast has wild price swings as demand changes faster than supply, and there's no massive stockpile of indium bullion being stored by investors who would moderate that volatility by buying it when it looks cheap and selling it when prices look high, unlike silver, gold, and some of the major platinum group elements, but like the less popular PGE's like Osmium, Iridium, Rhenium and Rhodium, where supply is inelastic (they're also extracted from the waste mining other elements... except those elements are less common than zinc and copper: Ni/Pt/Pd. The economics are distinct form the rare earth elements - those in contrast are not particularly rare, but are simply extremely hard to separate from each other because their chemical properties are almost identical, though their other properties are wildly different and incredibly useful in diverse areas of condensed matter physics and technology; to make rare earth magnets, you need just the neodymium, many phosphors require just the europeum, the best high temp superconducters (as well as some extremely chemical resistant ceramics, eg, yttrium stablized zirconia) need clean yttrium, and so on; the reason you hear people fretting about rare earth supply is not so much because it's hard to find places to mine mixed rare earths, but because of the large (and environmentally problematic) facilities needed to separate them from eachother and most importantly from the radioactive thorium usually present in the same ores).
...
How'd I get so far off on that tangent? Anyway, the 16u2 on official arduino uno/megas is very vulnerable to even minor and brief excursions of the +5v rail which can happen through an excessive voltage on a pin being clamped to the positive supply rail by the protection diodes, thus raising the voltage on that rail. So ironically, while the 328p on the uno is socketed, it's considerably more resistant to damage than the non-socketed, almost impossible to replace, 16u2. To further complicate the matter, the circumstances which trash the 16u2 also tend to trash the opamp used to control the power supply source (USB vs regulator) and one or more of the on-board linear regulators, I am aware of many people trying to fix boards that failed like that by replacing parts, but I don't know of anyone who has reported successfully doing so, because of the number of parts often damaged.
TLDR: buy a new Arduino Uno. Uno clones (which use other serial adapter ICs, generally CH340's, are more difficult to destroy like this, and while on those you can't reprogram the 16u2 (it doesn't have one) to do something other than act as a serial adapter, since he Arduino team never provided a core or hardware package to program these, the upsides of those parts were largely squandered while the downside of their fragility remained).
I think I own one official uno, one official nano, one official mega2560... and about 2-dozen pro minis clones, 2 uno clones, 2 mega clones, over a dozen nano clones not counting the ones turned into dedicated programmers... half a dozen of those godawful LGT knockoffs, plus, since I make and sell boards with the latest and greatest AVRs (AVR Dx and tinyAVR 0/1/2-series) I've got mountains of those, totalling hundreds of assembled boards, constituting the inventory of my tindie store). I've concluded that Arduino proper is largely inompetent as embedded hardware and software engineers, but they have done a mindbogglingly good job at threading the needle between the oppressive learning curve of things like Microchip studio (which do too much, and hence end up requiring a very painful learning curve), and more primitive development methodologies, which are a bitch to use because they leave you on your own to create a working build environment. They've managed to make a single IDE that a noob can use perfectly well with the API functions, and which a wizard who peppers his code with inline assembly, knowing where the compiler will do a poor job and implementing it by hand, as well as everyone between those extremes can all use, and none of them will be overwhelmed with an urge to hurl the IDE and it's designers out of a high window (unless they open the serial monitor, which is terribad. It basically lacks lacks almost every feature that I would consider a non-negotiable must-have feature for embedded development serial consoles, and is utterly unfit for purpose, and I never use it).
The Arduino team did a very good job on the IDE itself, at though they're bad at not introducing regressions, so you end up with random builds being great, and others severely bugged; 1.6.9 was the champion for a long time, then it was 1.8.13 when they fixed a long standing and vexing treatment of programmers provided by programmers.txt and greatly improved behavior with multiple packages installed (they added a new bug in 1.8.14 which would prevent all functionality when my cores were installed manually. Not just the boards supplied by the offending package, but all devices, would fail to compile); I only recently came up with a workaround - which I will note i thoroughly despise) was the champion, and the 2.0.x versions are still unusable shitshows because of uncorrected regressions that destroy functionality).
They did an even better job of outreach though, and are huge in the education sector, and Arduino based intro programming courses, despite the fact that you're writing code in embedded C/C++, seems to result in education results that put programming classes based around friendly languages to shame, in terms of the key question "after this course, which high-school students come out knowing the fundamental principles of programming?" - if you told someone pre-Arduino that embedded C++ on a part with 32k of flash (less in the earliest arduinos) would be a great introduction to programming concepts, you'd have been laughed at. Then Arduino came and did it, and turns out, the highschool students find it more engaging and (since interest and learning go hand in hand) learn better that way, while courses that tried to use python, javascript, and that sort of thing running on desktops to teach programming, IME, educate only the people who would be able to learn programming without any school structure - people who don't need school-run programming classes at all.
The relatability and magic of programming an embedded system with physical objects, and Arduino's willingness to hide tons of complexity (at a cost of efficiency and advanced functionality) from the API functions in spite of the user-unfriendliness of C/C++, and of packaging up toolchains to free the user from build environment wrangling (which is hell) wins when compared to desktop programming in easier languages, where nothing seems worthwhile because we're in a world saturated with desktop software which they're very familiar with and makes everything they write look discouragingly rudimentary and crude, such that they lose interest.
But when it comes to both the implementations under the hood to implement that API and their hardware design on official boards... it's a castle built from the misshapen and ill-fitting stones of bad software design decisions, resting upon the sandy foundation of poor hardware design. (I could go on for many pages about what I think is terrible about the official hardware and official cores. Even if I use an official board, I wouldn't in a million years use the official core for it when MCUdude maintains cores for all the same AVRs which are fit for purpose, or nearly so.
)
Hm, and I got wat the F off topic again didn't I? Anyway. There are two paragraphs up there related to your question, I swear.