Popup messages containing phone numbers are never from Microsoft or any other valid company, they simply don't operate in such a threatening manner and never provide phones numbers to call, since they do all business via computer and your online account. If it has a phone number, it's fake.
What you experienced is called a 'Tech Support Scam' and Microsoft provides the following information to help you understand these better.
Protect yourself from tech support scams - Microsoft Support
Since you fortunately were unable to pay their ransom for returning use of your device, you've managed to avoid the need to contact your bank to reverse any charges, but obviously you should not pay them anything for their abuse of your good nature.
However, since you've now provided them with your phone number, they have another form of contact they will first try to use themselves to get you to pay for their [fake] 'service'. Once they determine you aren't actually going to pay, they'll likely also sell this information to other scammers who'll badger you with calls for other scams.
I tell you this last portion not to scare you but prepare you for what likely may come next. What you need to know is that engaging with the scammers and try to get them to stop won't work, they'll believe they have an easy target and continue to try and get more from you until they're certain this won't occur.
What I want you to realize from that last part is that the only way to stop these is to either block the scammer's calls or emails if you gave them that contact method as well, and if they still manage to reach you via new numbers, the only thing you should do is hang up or put their messages in your junk folder. Engaging with them in any way, including yelling at or abusing them on the phone just proves you're willing to engage, so if you don't manage to avoid their call in the first place, hang up the moment you realize who and what they really are.
If you need any additional help removing whatever software they installed on your machine already, either ask in this thread or start another here that specifies what type of aid you truly need.
Rob