Someone wanted to learn this too, so Grasp built them a personal learning path.
You can keep exploring this one or create your own
Terraform Internals and Provider Development
Module 1
Terraform Source Architecture and Execution Tracing
Module 2
HCL Parsing and Configuration Loading
Module 3
cty Values and Expression Evaluation
Module 4
Resource Addresses, Schemas, and Instance Expansion
Module 5
Dependency Graph Construction
Module 6
State Representation, Persistence, and Recovery
Module 7
Provider Processes and Plugin Protocols
Module 8
Refresh and Plan Generation
Module 9
Apply Graphs, Concurrency, and Failure Semantics
Module 10
Clone CLI Integration and Operational Debugging
Module 11
AWS Provider and S3 Source-Code Anatomy
Module 12