"How computer works" is a very wide topic. If you are thinking of hardware, the assembling of a PC would let you learn the superficial fact what's the function each component. A CPU to process the data; GPU to process the graphics; the RAM holds and shuffles the data; the SSD/HHD storages the files; the fan/cooler dissipates the heat. I don't think you need to build a PC to learn all that.
What makes computer work (depending what work you are thinking about), depends very much on the software. That is a whole different subject. The are many high level languages for coding. There are some bites and bytes in the deep end. Or, like me, just buy what I need. Again, you're not going to learn that to build.
Most people have a specific purpose, or purposes for their PC. It could be minding cryptocurrency; editing photo/video; playing games; crunching data; browsing the web; managing their business affair; downloading/streaming. There are different requirement in hardware of different applications.
It is a long response for your questions. Maybe you can do some more soul searching before you spend your first dollar. What's obviously to me is, in this day of age, if you don't have a PC at home, you probably don't know that.
[PS: How did you come to this forum, if you don't have a PC?]