The short answer
Yes, in almost all circumstances you can keep your existing home phone number when you switch broadband provider. This is called number portability and all UK providers are required to support it. Your number belongs to you, not to your provider.
How the process works
When you sign up with your new provider, simply tell them you want to keep your existing number. They will initiate a number porting request, which is a standard part of the sign-up process that your new provider handles on your behalf.
What about the change from landlines to VoIP?
As BT switches off the traditional copper PSTN network, phone calls are moving to VoIP delivered over your broadband connection. Most broadband providers now include VoIP calling as standard, and your existing number can be ported to their VoIP system.
How long does number porting take?
For most straightforward transfers, number porting takes 1-5 working days after your broadband connection goes live.