The scammers are usually are sitting in a call center (in Asia usually.) However if they would call from that number people won’t pick it up or would not believe that it is Amazon, Microsoft or your bank. This is the reason they are pretending to be calling from an another (local) number. They can do this using a loophole in the roaming system. So this why you can receive calls pretending by to be your contact’s number or even from your own number. This is why just blocking those numbers is not that effective. Also if you call the number back, it is not the scammer, just a normal person or business with that number. Hope this explains it.
If you want more details, let me refer to you to the Wikipedia article
If you are targeted they can get the number of your contacts by using OSI or other methods. But in most cases it is just a coincidence that it looks like that that someone you know is calling. All that said, if the call is coming from your contact named uncle Joe and some guy with a strange accent saying they are calling from Microsoft, you will know it is a scam.
What are you referring to by “OSI”? Not the 7 layer model, but that’s all I can find. It’s good to explain abbreviations when they’re not the most common usage of that abbreviation.
If they don’t have my contacts, they can’t spoof a number from my contacts. If they just spoof local numbers, the chance of them choosing one of my contacts is incredibly slim.
They are not actually calling from your number. They just spoofing the caller ID. More on this in the Wikipedia article