That’s a very good explanation.
Now forget you read that and never ever implement that yourself in production situations. Instead rely on hardware implementations and established libraries.
AES is practically impossible to implement without introducing huge side channels. Verification of side channel resistance is a huge issue.