Yes but you will generally pay more for your monthly plan in those cases vs. buying an unlocked phone at full price and a dirt-cheap SIM like Lebara.
In my country you do not. No idea how they do it, but the plan and buying the phone separate (iPhone 16 pro Max) phone costs about 300 more than the phone and plan combined.
You can still do that as well