without using my credentials to login
It is not possible.
The iPhone has a MDM profile, see this Apple article: Checklist: If you want to see if anyone else has access to your device or accounts
Checklist: If you want to see if anyone else has access to your device or accounts - Apple Support
See point 5.
See also the following Apple articles:
Get started with a supervised iPhone, iPad, or iPod touch
Get started with a supervised iPhone, iPad, or iPod touch - Apple Support
Install or remove configuration profiles on iPhone
Install or remove configuration profiles on iPhone – Apple Support (UK)
If you have buy 2nd hand, you need to contact the company or the seller, otherwise you have been scammed.
See also -> The All Too Common SAD Reality of Buying a Used iPad/iPhone
The All Too Common SAD Reality of Buying … - Apple Community