In the United States, most scientific research is funded through government grants from agencies like the Department of Energy, Defense Department, or the National Science Foundation. Comparatively little research is actually funded from the endowments/operating budget of the universities themselves.
Please don't make such a blanket statement. Donations do indeed fund scientific research directly. When a faculty member is hired, they get a "startup fund" to get through their first few years before they have grants, most of which is donated money. There is also a lot of research which is not "billed" to a grant, but is still meaningful, and supported by "internal funds" which are smaller university fellowships for pilot projects. These internal funds are also the only source of funding outside the physical sciences (for areas like humanities and social science) and are almost entirely provided for by donations.
The amount of funding that the University supplies directly is obviously dependent on the field, and it's own traditions. However, in biomedicine, when a new prof has "startup" funds, these are often linked to their contributions to teaching and "service", i.e. admin, pastoral care, etc; they can later "buy-out" their service obligation by raising grants equal to their salary and costs, or more. So the "startup" funds are usually not entirely paying for research.
What is funded through the endowment, though, is university infrastructure, including laboratories. Also, building maintenance if funded through research grants, that is the dreaded "indirect costs". The steep cut in federal support for research means that universities need to find other avenues to maintain their building stock.