To mount an encrypted APFS volume (created on macOS) on Debian Linux, you can use apfs-fuse. apfs-fuse is a FUSE-based driver that allows Linux systems to mount APFS volumes for read-only access. It supports encrypted volumes and will prompt for a password when mounting.
This is how to install and use it.
Install dependencies:
sudo apt install fuse libfuse3-dev bzip2 libbz2-dev cmake gcc g++ git libattr1-dev zlib1g-dev
Build the module:
git clone https://github.com/sgan81/apfs-fuse
cd apfs-fuse
git submodule update --init
mkdir build && cd build
cmake .. && make
Mount the volume:
sudo ./apfs-fuse /dev/sdXn /mnt/apfs-data