I would like to buy a second SIM card to use Telegram. Can I simply get a number with it and continue to use this number via WLAN as soon as the SIM card is empty?
Yes, this is basically possible. You only need the SIM card for the first registration to receive the SMS code. After that, Telegram runs via the Internet, so it works without any problems via WLAN only, even if there is no credit left on the card. An important note of caution: Most providers deactivate prepaid cards if they are not topped up or used for a long time (often after 12 months). If the number is deactivated and you accidentally log out or change your mobile, you will no longer be able to receive a confirmation code and will lose access to your account. It is therefore worth using the card minimally from time to time to keep the number active.