That is not correct. In both cases, a class object gets constructed and gets assigned to the static variable h, which is globally available through hierarchical references.
You won't see any functional differences with these small examples The main difference you need to understand is how the objects get their initial random seed and how code changes affect random stability (the measure of how much code can be modified and still get have the exact same sequence of random values generated).
The first example is constructing a new object for each iteration and getting the seed from the initial block thread. If you add construction of other objects to additional class variables in the loop, you disturb random stability of the h.randomize() method.
In the second example, there is only one object that gets seeded outside the initial block. Each time you call randomize(), the object gets a new seed. Constructing other objects to other varibles has no affect on the stability of h. But is you add additional static variables with initializations outside the initial block. you may disturb the seeding.
The is no "right way" of doing this. You just need to be aware of the coding choices and how they affect random stability.