$ grep '.*\.ko\.zst$' << EOT | sed 's#.*/\([^/]\+\.ko\.zst\)$#\1#g'
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/crypto/sha256-ssse3.ko.zst
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/crypto/sha512-ssse3.ko.zst
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/crypto/twofish-avx-x86_64.ko.zst
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/crypto/twofish-x86_64-3way.ko.zst
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/crypto/twofish-x86_64.ko.zst
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/events/
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/events/amd/
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/events/amd/power.ko.zst
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/events/intel/
usr/lib/modules/5.14.11-hardened1-1-hardened/kernel/arch/x86/events/intel/intel-cstate.ko.zst
EOT
sha256-ssse3.ko.zst
sha512-ssse3.ko.zst
twofish-avx-x86_64.ko.zst
twofish-x86_64-3way.ko.zst
twofish-x86_64.ko.zst
power.ko.zst
intel-cstate.ko.zst
For a file, naturally, you would use:
$ grep '.*\.ko\.zst$' <some.file | sed 's#.*/\([^/]\+\.ko\.zst\)$#\1#g'
Update: awk one-liner (single program execution, no pipes):
$ awk '{print gensub(/.*\/([^/]+\.ko\.zst)$/, "\\1", "g", $1)}' <some.file