First you need to be aware that a very old first generation iPad2 can only be updated to iOS 9.3.5 (WiFi Only models) or iOS 9.3.6 (WiFi & Cellular models).
Apple ended update support for iPad2 in September 2016. Your iPad2 cannot be updated to iOS 10 or later major versions of iOS as the internal hardware does not meet the minimum technical requirements for new versions of iOS/iPadOS. This limitation cannot be bypassed; iPad2 is a 32-bit architecture device, whilst all recent versions of iOS/iPadOS are designed for 64-bit hardware platforms. iPad2 is obsolete.
Compatible Apps for the iPad2 are no longer available - as App Developers have dropped all support for 32-bit devices - and many for iOS versions preceding iOS11/12/13. As older versions of Apps are removed from the Apple App Store, you’ll not be able to (re)download or install them - which may severely limit the usefulness and utility of your iPad. As such, if you want or need to access most current Apps, requiring more recent versions of iOS, you’ll need to consider a much newer model of iPad.
Of current models, even the entry-level iPad9 has specifications and capabilities that will massively outperform all older 32-bit devices - is compatible with iPadOS16 and the vast majority of current Apps. Other models are more powerful still.
If the iPad is Activation Locked, it won’t be usable until the previous owner removes the Lock. If an Activation Lock is present, only the former owner can remove it:
What to do before you sell, give away, or trade in your iPhone or iPad - Apple Support