Often, passwords are noted in the original electrical schematics or the "As-Built" documentation provided by the System Integrator.
Once you regain access, implement a strategy to ensure it doesn't happen again:
Koyo PLC Password Unlock: A Comprehensive Guide to Regaining Access
This guide covers the methods, safety considerations, and best practices for managing password protection on Koyo/DirectLogic PLCs. Understanding Koyo PLC Security Levels
Always put the PLC in STOP mode before attempting recovery to prevent unexpected machine movement. How to Prevent Future Lockouts