How can I read the sources of ruby(v3.1.0) and other big projects

As a practice of learning compilation theory, I tried to implement a language interpreter with what I’ve learned. I get Lua and Ruby source codes for reference, as Lua code is relatively small and Ruby is the one I am familiar with.
Firstly I coded a hand-written lexer and parser ,along with its simple vm using cpp. It is based on a stack(like Ruby),and has blocks and scopes.
It can eval codes like this:

c=1;
for(b=1;b<9;b+=4){
      c*=3;
}
d=c;

However, the incomplete vm doesn’t have GC , function definition and function call. Then the whole program grew out of control when it had 9 source files,14 headers. I gradually get unfamiliar with my own code (although I wrote comments), and finally dropped this project.
Those complete languages have more functions and more complicated architectures. Lua has 34 source files and Ruby has 107, and they depend on each other ,one by one. Also the function and macro definitions are so many that I can’t trace them to the first declaration, Therefore I can’t get a point to dig into.
This problem also appears when reading other projects, even if many softwares are open-source, I can’t understand the how they work, let alone making contributions. How can I get over this difficulty and complete my own projects?
Thanks to everyone for helping.

从 Windows 版邮件<‎Microsoft Outlook on the App Store>发送

This problem also appears when reading other projects, even if many softwares are open-source, I can’t understand the how they work, let alone making contributions. How can I get over this difficulty and complete my own projects?

It can be helpful to write down a software system design specification. Starting a second new implementation is ok, since you can use knowledge from your first learning experience. Lua, has good documentation for this, perhaps due to its partially academic origins. The core development team is smaller than for other programming languages though:
https://www.lua.org/faq.html#1.9

For learning, perhaps examine a few other projects such as:

GitHub - alexbrahastoll/stoffle: A toy programming language developed as a series of blog posts for the Honeybadger blog. - is a nice documented example, but less complex than what you are doing.

Write your Own Virtual Machine - Ruby implementation could be a good contribution

GitHub - mrubyc/mrubyc: mruby/c is another implementation of mruby. - less well documented, but created for production use, not primarily education

For open source projects with an active community, make contributions to the project and review other peoples contributions. There is usually no need to understand the entire code for your first contributions.