How do I create an object completely through code?

I want to learn the hard way of creating objects and meshes before doing it any other way. I have also scoured the unity documentation and Youtube tutorials and have yet to find exactly what I’m looking for. It is more than likely that I’m just not seeing it, but if you fine people could assist it would be greatly appreciated.

If you’re looking on how to make Meshes, here you go:

You basically have to create vertices by code, then group them to form faces for your mesh. There’s quite a few topics on this, you just need to know what to search for “how to create procedural meshes” or something along those lines.