Apple does not preinstall any Microsoft products or associated Microsoft licenses. You were badly misinformed. If this was a properly prepared used Mac, it would still not have any Microsoft footprint installed on it.
You have to decide whether you want a subscription to Microsoft 365 or pay once for the current Microsoft Office 2024 for Mac, or the older replaced Microsoft Office 2021 for Mac. Although in either case, the applications have the same functionality, the subscription, and single-purchase licenses are not interchangeable with the applications.
You can get the appropriate licensing and products from Microsoft; from the online Apple Store, or the subscription-only Microsoft 365 applications downloaded from the macOS Mac App Store which will have in-app purchases for the preferred subscription licensing.
Alternatives are Apple's free Pages, Numbers, and Keynote which are available from the Mac App Store. These are not clones of their respective Word, Excel, or PowerPoint applications. Just launch the Mac App Store and search for pages and it will show all three for installation. Or the free LibreOffice Suite which is purposely intended to be a clone of Microsoft Office.