The altitude assigned is one that keeps you safe until established on a published segment of an approach. After that, published altitudes apply. See 91.175. A published segment is a bold, black line.
The localizer itself is not a published segment, because it exends much farther out than what has been surveyed by the approach designers. Only the part that overlies a bold, black line is a published segment. Many times controllers will vector you to intercept the localizer beyond the fix where the intermediate course begins; when you intercept the localizer, you are not yet on a published segment, and you must wait until you reach a fix that marks the beginning of the segment. ATC is not supposed to use the phraseology "until established" in this scenario, unless the vector will actually put you on a published segment. But they do.
Instead, they're supposed to give you a crossing restriction, "maintain 3,000 until crossing X, cleared ILS Rwy YY." At your option, you can remain at the assigned altitude or descend to a published altitude, absent any maximum or mandatory altitudes on the approach. These are rare.
I teach descending to the published altitudes, mainly to get the student in the habit of paying attention to such things. On a non-precision approach, it could make a difference between getting in or not. Real world, however, many pilots will remain at the assigned altitude and just intercept the GS at the higher altitude. Where the cloud layers are could affect this decision, as would the presence of icing.
Be aware, though, the GS is not primary for altitude guidance until the FAF, so if there are any step down fixes prior to that point, you're still bound by them, regardless of where the GS is taking you. This is a factor for some approaches out west, from what I understand.