Trying to recover from very old macOS backups, but not sure I can recall the login/passwords I was using then
My old beagle (old but smart !) has a answer : Use a second Apple computer . Start the locked computer in target mode and use it as a external HD. Connect a Apple computer with the locked one (with a FW/USB/TB cable https://support.apple.com/en-ca/guide/mac-help/mchlp1443/mac) . The locked Apple will show-up on the desktop as external HD . Enjoy ! (Could not work if the MacOS are from different OS generations)