This question already has an answer here:
I'm curious if there's a good in-universe explanation for this.
In Star Trek II, we see Admiral Kirk have to give a retinal(biometric) scan to access Project Genesis data.
Memory Alpha also lists the DS9 episode Q-less as having a retinal scan, so the technology still exists in the 23rd century.
But then there's TNG Brothers where Data takes complete control of the Enterprise by emulating Picard's voice. It seems to me that this is a massive security hole because, as demonstrated, an emulated voice is good enough to fool the on-board computer(which also makes me wonder why nobody else tried to do it like that, since it seems trivial enough).
Why not use some form of biometric system (or even some sort of two factor authentication like a communicator) for critical things like locking out command functions and such?