From experience. Most students do not use physical textbooks. They mostly use pdf only for assigned problems. Its pretty rare for students to read book nowadays.
The only students who truly read books are those with a genuine passion for what they are studying. Typically, these same students are the ones that excell in there program and go onto graduate studies.
I would keep them for future relatives.
Some people donate them to libraries. But from my experience. Libraries either toss them, or no one bothers to look at them [ I worked at a library for 2 years, and we tossed a ton of books, and i would pick them out of the trash after my shift]
Finally, you can sell them. I wouls suggest looking up prices, and if you do go this route, then list them on sites like ebay,mercari, etsy.
Do not sell them to used bookstores. You will literally get pennies on the dollar.
Or you can chose to donate them.