Sorry this answer is so long, it got away from me! I'm a bit uncertain about a couple of things regarding your question. On the one hand, you are asking about the best universities in the world, and on the other, you are excluding places such as MIT because they already have exceptional students. But places like MIT, Caltech, and Stanford are among the best in the world precisely because both the students and the faculty are high-caliber. By definition, a college that "average/above average students" attend is an average/above average college.
Also, you're asking about teaching, but you also mention research. Broadly speaking, teaching and research are two different pathways in academia. Places like MIT and Caltech no doubt have some good teachers, but that is not what they are known for. They are known for being research powerhouses. The faculty there do not spend their time teaching undergraduates the basics. They spend their time on work that extends, sometimes revolutionizes, the field. Someone interested in teaching rather than research would likely not be employed at places like that. Smaller places like Harvey Mudd College are far more likely to be known for being excellent teaching institutions.
So I'm assuming what you're really asking is: What does computer science education look like at places where the goal is to teach students well? I have taken undergraduate computer science courses at good teaching institutions in both India and the US. From your description of the way CS is taught in Nepal, it is reasonably similar to the Indian system, so I hope I can compare the system in India to the one in the US in a way that will be helpful to you.*
First, the syllabi you have shared (for not just the DBMS course, but the other courses linked at that site) are not all that different from undergraduate courses in CS in the US. I will use a data structures and algorithms course as my example because I haven't ever taken a full fledged course on DBMS. Whether in India or the US, any basic DSAL course will be designed to cover linked lists, stacks, queues, trees, graphs, heaps, hash tables, recursion, sorts, and Big O complexity. As Ben I says in his answer, the course syllabus is contractual. The contract isn't just between the teacher and the student. In the case of public (i.e., government-run) universities, it can be between the college/university and the state, or between different components of the state's university system.†
So the major difference between India and the US is not the material taught in a given course. At least in the case of public universities, the teachers do not have very much freedom about the concepts and techniques to be covered. Where they do have freedom is in how they teach that material. A faculty member teaching a given class decides what textbook to use, if any. More important, she decides what assignments the student must complete in order to pass the course. And she decides on the grading criteria for those assignments. She also decides what constraints to put on the students' choice of language: some professors will say "use C," others "use Java," others, "I will go over algorithms in pseudocode and don't care what language you use for the implementation."
This is a degree of freedom very different from what was available to my professors in India. In India, the professors gave us the code (e.g., for how to implement a queue), and it was invariably in C. A good teacher would explain the code in a clear and engaging manner, a bad one not so much, but good or bad, they expected us to more or less copy the code as given. We were never tested on our understanding of the code. As your labs seem to be, our labs were trivial. We were expected to reproduce the code as explained in class, make sure it compiled, and check that it behaved as expected. Did we reproduce the code well enough for the code to run properly? Then good, the lab is done. Our scores for the class depended mostly on exams. And in the exams, we were asked to reproduce from memory, in longhand, some of the code from the class: "Write a function to check whether a given value is in a quadratic probing hash table," or "to remove a node with a given value from a doubly linked list," etc. Whether for exams or for labs, at no point did we ever write code to solve any problem we had not encountered before.
By contrast, the best teachers here in the US take full advantage of the freedom they have to design their courses in a way that will reinforce the students' understanding of the material. Let's look at lectures, lab assignments, and exams in that order.
In a lecture on linked lists, for example, the professor might explain the code to remove a node from the middle of the linked list. Then she might say, okay, what if the node we want to remove is at the beginning of the list? And then she might wait for a student to come up with an answer. Even if the answer is incomplete or wrong, the professor will work with the student (and the rest of the class) to explain what is going on, so that eventually the student and the class work together with the professor to figure out the correct answer. When lectures went online during the pandemic shutdowns, professors tended to modify this teaching model for use in their videos. For example, they might say, "How would you remove the node if it was in the middle of the linked list? Pause the video and think about it, and try writing the code!" This emphasis on having the student do active work during class time seems so basic to instruction here, yet it is completely alien to the way our teachers taught in India. They would provide the code and go over it, that's it. Even when the professor made the explanation very interesting, the idea of using the lecture as a Socratic space where the students were expected to contribute was not entertained.
So much for lectures. What about lab assignments? They are designed to both test and extend the students' understanding. Students turn in code very often: weekly is fairly typical. The code goes beyond material already covered in class. So if the professor has shown in class how to implement a min heap, the lab assignment for that week might be: write the code to implement a heap sort. This is quite doable within a week, but will take understanding and effort on the student's part. There might also be a portion asking theoretical questions, e.g., comparing the complexity of heap sort to some other sort (merge sort or quicksort, perhaps) and discussing the tradeoffs. These assignments are not designed to be easy, and students are given avenues of support outside of class. A tutoring center at the university, for example, might have upper-division students, volunteer tutors, or even paid staff to help students (for free) by explaining concepts or debugging code. Faculty too are expected to hold "office hours" where students can visit the faculty member to ask questions regarding course content or assignments.
Also, some professors "flip" their classroom. This means the student is expected to read the textbook chapter/slides, and work on sample problems, before the relevant concept is discussed in class. During lecture time, the professor will assume familiarity and give only a very broad review of the concepts covered in the reading, then provide a longer problem to solve involving those concepts. The professor's role is to answer questions students might have about how to solve the problem. Sometimes, the lab assignment due that week is the problem that was introduced during class time.
In both flipped and traditional classrooms, there is often a final project that is very open ended. "Given this data, and this desired functionality, design and implement the needed data structures to hold the data and provide the functionality." You have to decide whether to choose a hash table or some sort of tree or ... whatever, to hold that data; you have to justify the choice you make; and you have to write all the code that will implement the desired functionality. So the student actually is "building stuff," as you put it.
What about exams? Some professors have no exams. The justification for not having exams is that professional programmers have access to the same set of resources students do, so the exam is simply an artificial setup with no real purpose. Others might have a midterm exam and/or a final. The justification for having exams is that with ChatGPT, etc. readily available, an exam is the only way to verify that the student actually knows the material. And one professor I had, who taught extremely well and set notoriously difficult exams, said that the exams were preparations for coding interviews—when a student applies for an internship or a job, they will similarly have one hour in which to think on their feet and answer three or four tricky problems that they've not seen before.
For those professors who do make their students take exams, the questions might be something like: "Here is some code that is supposed to reverse a singly linked list. There are mistakes in the code. Identify and fix them." The student will not have seen code to reverse a singly linked list before, and might not even have thought about such a thing. Another question, also involving previously unseen code, might be: "Is there a memory leak in the following code? If so, fix it. If not, explain how the code properly handles memory allocation and deallocation." Or, again with previously unseen code: "What is the following algorithm doing? What is its time complexity? Explain."
Being able to answer such questions will require that the student have understood the principles. And usually, the professor is checking that understanding—not code syntax! Professors might say, "just give me the pseudocode, I'm not asking you to implement this in working fashion in longhand," or even "if you don't know how to accomplish one particular piece of the code, just put in a comment saying 'assume that this value is correctly dealt with' and go on to the rest of the code, don't get stuck figuring out a small part of the whole problem." The basic goal is to check that the student is thinking on the right lines, not to ensure that the student has put in every semicolon.
You ask about "the entire lifecycle of a semester." The system I'm most familiar with in the US has quarters (12 weeks) rather than semesters (16 weeks). Although is used in relatively few colleges and universities (Stanford being an example), it is what I know. A lower-division CS course in a quarter system is between four and five "credit hours." Each credit hour represents time spent with the teacher in the classroom or lab every week. For each such hour, students are expected to spend two to three times as many hours doing homework, reading, etc. on their own. So a student taking a five credit hour class can expect to spend 15–20 hours per week total on the class: attending lectures, reading the textbook (or online materials such as slides), doing the lab assignments and projects, and preparing for exams. A full time student is expected to carry 12 to 15 credit hours per quarter.
In conclusion, I should mention that the philosophy and practices I've described above are what worked for me as a student, and what I try to emulate. Not every professor here is brilliant. I've had my share of bad teachers here. And of course I have made and continue to make tons of mistakes in my own small-time teaching as well. I have great respect for teachers in India too. The system there is set up to deal with large numbers of students who take standardized exams, and teachers there do not even have TAs for the most part. They are doing their best given the circumstances. If it feels like I'm extolling the US system and running down the Indian system, that is not my intent and I apologize. The setup is different, that is all. And the setup in the US relies on systems and resources that are not presently available to most universities in India. Certainly given the very large numbers of Indians I see here in Silicon Valley, it appears that the Indian university system is doing a good job teaching CS as well.
*When I say that the systems of India and Nepal seem similar, I am comparing only the systems, not the teachers. I did not get the sense that my teachers in India were unhappy with the system, nor that they were looking to take the GRE and leave, so that seems different from your experience.
†For example, California has a system of two-year community colleges. A student who takes a data structures and algorithms course at a community college is guaranteed to learn the same basic material at a student who takes an equivalent course at a four-year University of California campus; that guarantee is one of the conditions for such a student to transfer to the four-year campus to complete a bachelor's degree. If the two-year college did not have such "articulation arrangements," as they are called, with the four-year university, then students at the two-year college could not be assumed to know what they would need to know as foundational material for third- and fourth-year courses.