On an iPhone, signing out of iMessage, iCloud, and your Apple Account (Apple ID) should not be confused with the device actually being Activation Locked.
Signing out essentially prepares the iPhone to be separated from your Apple Account, but the device itself will not display an “Activation Locked” message simply because you have signed out.
If you sign back in using the same Apple Account, the iPhone can be associated with that account again, and services such as iCloud, Find My, and other Apple Account features can be restored according to your settings.
However, there is an important distinction when preparing an iPhone for another person. If Find My is still enabled and the device remains associated with your Apple Account, another person may encounter Activation Lock when they try to activate the iPhone. They would need the credentials of the Apple Account currently linked to the device to complete activation.
If you want to permanently hand over or sell the iPhone, the proper process is to sign out of your Apple Account, turn off Find My, and remove the device from your Apple Account when required. Once the device has been properly removed from the account and Activation Lock has been cleared, the next person can activate it and sign in with their own Apple Account.
So, the key point is:
Signing out ≠ Activation Lock.
Activation Lock is tied primarily to Find My and the device's association with an Apple Account, not merely to whether you are currently signed in to iCloud or iMessage.
Also, simply signing out and then signing in with a different Apple Account does not, by itself, mean the iPhone will become Activation Locked. If Activation Lock appears, it indicates that the device is still associated with a previous Apple Account through Find My and has not been properly released from that account.


If you are the owner or the owner has shared all information with you then to open Activation Lock:- If it is Activation locked, read here --> Turn off Activation Lock - Apple Support Activation Lock for iPhone, iPad, and iPod touch - Apple Support
Learn how to remove a device from a previous owner's account.
If you are not the rightful owner of this iPhone and do not possess the associated Apple ID and password, there is absolutely no way to gain access to the device. Apple’s security framework is designed to prevent unauthorized use, so the only circumstance in which you could unlock the phone is if the original owner willingly provides their credentials. In rare cases, access might become possible if the owner unintentionally removes the device from their Apple ID account, but this is purely accidental and not something you can rely on. In essence, without the Apple ID and password, the iPhone remains permanently tied to its legitimate owner.