You can use Safety Check on iPhone to quickly stop sharing your device access and personal information with others. Safety Check helps you quickly change your passcode and Apple Account password, stop sharing your location with Find My, restrict Messages and FaceTime to the device in your hand, and more.
Go to Settings Additional considerations when using Safety Check in the Personal Safety User Guide.