Page content loaded
You haven't provided enough information to answer the question. In the US, the only source for unlocked iPhones is directly from Apple. If you buy a phone from a retailer such as Best Buy or Walmart, the phone will lock to the carrier used to activate it. It doesn't matter whether you paid for the phone in full, that's the way it works. Only the carrier it is locked to can legally authorize unlocking it.
If the retailer told you it was an 'unlocked' phone, they lied.
Carriers don't generally lock devices intentionally out of the blue.
Many retailers in the U.S like Best Buy or Walmart will sell a device that will lock to the first carrier used to activate it. That's just the way it works when you buy phones from retailers outside of Apple.
But carriers are not known to just randomly lock a phone that was actually previously unlocked officially.
i.e if your Phone is locked, it was either set to be locked as above, or was never unlocked to begin with.
Once a phone is officially unlocked by the carrier it was locked to, or if it was bought from Apple unlocked, it should never lock to any carrier again.
Question: Can carriers lock your phone if you did not buy it from them?