は is read “wa”, but only as a particle
The character は is read “ha” in ordinary words and “wa” only as the particle after the topic. こんにちは ends in the same “wa”.
The character は is read “ha” in ordinary words: はい, はじめまして, はな. Only when it is the little particle after what you are talking about is it read “wa”: わたしは がくせいです. Written, it looks the same, so the sentence decides.
こんにちは and こんばんは end in the same “wa”. The greetings were once the start of a sentence — “as for today …”, “as for this evening …” — that nobody finishes any more. The particle stayed, which is why they are spelled with は though they sound “wa”.
The same happens with two more particles: へ is read “e” when it points out a direction, and を is read “o”. Three characters that change their reading when they become particles — and no more.