~てはいけない means must not, or may not, in the sense of giving rules (or I guess advice, in this example) to someone.
~なければいけない is what you use when talking about things you need to do.
At least, that’s how I’ve experienced the nuances. I think with some tweaking you might be able to flip them, but I’m not 100% sure.
I don’t mean to contradict you, but everywhere I look they just say that it means “must not do”, without specifying that it can only apply to someone else. There are even examples where people talk about themselves and use this grammar point.
The feeling of “this is not allowed” is much more common in my experience than the feeling of “I should do this”
And go ahead and contradict me if you think you’re right. If I can get better at Japanese, then I’ll change my mind.
EDIT: I asked a Japanese person and they said that you can use it for yourself. I still feel like advice or rules are more common, but it’s not impossible.
You can definitely use してはいけない to talk about something you yourself shouldn’t do. Without further context, I don’t think there’s a good way to know what the subject should be here. If you’re telling your mom why you’re in such a rush this morning, “I shouldn’t be late” would be correct; if your friend is telling you to hurry up, “you shouldn’t be late” would be correct.
It’s strange, but this grammar point seems more and more to have an equivalent in my language (German) - translated to “It doesn’t/cannot go” (“Das geht nicht”), which you can also use to describe yourself or state common rules. stating something as a common rule can also apply to yourself, if you want to express your convictions. Cf in english: I absolutely have to do this - Why absolutely?
I think in English, いけない would probably best translated as “won’t work” as in “there’s a test today, so being late won’t work”. Who’s the subject in this case?
Some Japanese sentences are indeed easier to understand using German like X が好きだ is closer to “X gefällt mir” than “I like X” in that X is the subject. this is why learning multiple languages is so fun ^^
I’m fairly certain that this is up to context as seems to be in most cases with Japanese. Obviously if you wanted/needed to make it clearer to avoid confusion, then you can always keep the topic attached rather than omit it. (Or do what hellistic said if it works, but I haven’t learned about な as a sentence ending particle).