I learned WAY back before internet and I was taught by "formula".

Major = 0 - 2 - 1 1/2
Minor = 0 - 1 1/2 - 2
Dominant 7th = 0 - 2 - 1 1/2 - 1 1/2
Minor 7th = 0 - 1 1/2 - 2 - 1 1/2
Diminished = 0 - 1 1/2 - 1 1/2 - 1 1/2
Augmented = 0 - 2 - 2 - 2

Where your start note is "0", you count up by half steps.

So G major would be

G (zero note) up 2 steps (or 4 half steps) to B, then up 1 1/2 steps (or 3 half steps) to D.

You music teachers in the room, do you still teach chord structure that way? Lessons ended in like 1965 for me. Fortunately my first teacher at just before 5 years of age was a FANATIC about theory.

And a great story. In 1973, I was just out of the Army and needed clothes. I went to a popular men's store in Cleveland and happened to wander up to the checkout at the same time as an older gentleman walking with a cane. He was in line ahead of me. The clerk asked "Can I have your name sir?" And before he could speak I said "His name is George Schulte, and this blazer he is buying is on me. And is not nearly enough to thank him for everything he taught me about music 15 years ago." And he looked over and finally recognized me. We walked across the street to a little coffee shop and had lunch and caught up on those last 15-ish years. He would be something like 118 now if he were still alive, but what he gave to so many young music students is alive and well.