So the premise:
1. You gain superpowers. For the purposes of this thread, you have Superman's power set and weaknesses--so pretty much upper tier, but with an achilles heel or two.
2. You are compelled, for whatever reason, to use your powers in public on a regular basis, in an obvious way. Let's just say you can't resist helping people.
3. You, for whatever reason, have determined that you need to maintain a secret identity.
The question(s):
1. How long can you keep your identity secret against what we assume are the full resources of your nation (or indeed the world)? What methods do you employ, and what likely defeats you (if anything)?
2. If your cover is blown, what realistically happens to you, and how long can you prevent/avoid whatever that is?
(asking for a friend)
Realistically against a modern surveillance state (US, China, UK, either Korea, much of Europe, Russia, etc.) I don't believe you could maintain a secret identity from the intelligence services of the state and other states for terribly long unless you had a full-body costume which didn't conform to your own body shape very closely (like a bulky space-suit-style outfit), and an ability to change in and out of it which superman doesn't really possess (so this seems outside the scope, I guess we're stuck with a conformant body suit and just super-speed quick change).
I think what would be harder than maybe people think is correlating times when you're not around and the superhero is, but that would be almost immaterial, because all they need to do is find one camera which catches super-you vanishing into an alley and normal-you walking out, and whilst they might have other suspects, you'd be on the list and they'll narrow it down fast.
If you were a shapeshifter and could teleport you could probably maintain your identity indefinitely, but that's not a superman-type's power set so outside scope.
So for 1. I think it would be weeks to single-digit months before the intelligence services figured out who you were. From the public? Almost indefinitely so long as you didn't have a distinctive appearance that made you easy to recognise (which I kind of think superman does, but that's a separate discussion).
However, with 2. in a non-superheroic world, what happens to you? Depends on the nation-state you primarily dwell in, and the attitudes of the leaders of that state and how the intelligence services operate.
I mean, the big problem is, with superman's power set, they probably can't do
anything at all to you yourself. And threatening your friends and family? That seems like a surefire way to get their agents maimed or killed unless you are incredibly forbearing, and with the mindsets of intelligence services, they'll immediately think "We'd hurt people who pissed us off, so this person will too". They can't even really risk attempting to attack you directly, because if you worked it out, the consequences for them, or anyone you believed responsible, could be very terrible and swift. Some states, like the US, would almost certainly attempt to test your invulnerability by arming people and hoping you tangled with them, but that's risky, because what if you join the dots? Or just make a leap of logic informed by suspicion? Superman is, with love, slightly dim,
very good-natured, and somewhat incurious (despite being a reporter). The same power set with someone with a very sharp and suspicious mind, especially one who leaps to conclusions, and a less forgiving nature? Terrifying. A huge risk to mess with them at all.
I think if we assume ultimately that rationality wins out over fear in the nation-state you dwell in, the intelligence services basically come to you in a grovelling mode, asking you to be a "patriot", to cooperate with them, please don't decapitate the government, and so on. Because what else can they do except basically appeal to your potential patriotism and maybe attempt to bribe you? I think that would probably factor in two. If you have a more venal personality, even if you're more heroic, they may well be able to subvert you with luxury and people sent to handle you, or they may believe they can.
Thinking of the UK, they could and probably would offer to just
D-notice any media attempts to seriously dig into your identity, whilst planting fake stories, using lookalikes, etc. to throw people off and discredit reporters who refused to be thrown off as kooks and weirdoes or even "terrorists". So then we get into the more complex question of international inquiries into your identity. Realistically things are going to spiral as other nations' intelligence services work out who you are and want to gain your favour (or see if they can whack you, but again, it's very likely they realize this is a bad idea before trying anything), but that's kind of outside the scope here.
Also breaking the secret identity is likely to benefit you in the short term because you will immediately be seen as a god and worshipped literally or metaphorically, no two ways about it. Look at how media polishes the boots of even the very worst billionaires, even the ones who don't own media. Look at how politicians behave towards them. You think they wouldn't immediately start frantically boot-licking someone who is indestructible, unstoppable, and faster than a speeding bullet? In the longer-term it would destabilize pretty much the entire planet so I think people (probably including you, initially at least) would want to avoid that happening, and preserve a pretty fiction of an unknown hero who only helps and saves.
TLDR: Any modern surveillance state will relatively quickly figure out who you are, but they will almost certainly want to get on your good side and actually happily aid any deception about your identity (to the point of suppressing media enquiries etc.). You won't need to forge your identity papers etc. because the state will be doing it for you to try and get you to work with them.