Chosen Solution

I forgot my passcode.and my data connection and WiFi connection is turned off how i can recover it

@hamza1 you’ll need to erase your device, which deletes all of your data and settings.Unless you made a backup before you forgot your passcode, there isn’t a way to save your device’s data. More about that on here

@hamza1 If you forgot your screen lock passcode, you can just upgrade your iPhone to the latest version. That means you can flash you iPhone. Download 3uTools and you can easily deal with this problem. But remember, when you flash your iPhone, do not select the option: " Retain User’s Data While Flashing"