Hello,
For the DFlash write-protect, you can use the FDPROT register which is loaded from the flash configuration field.
For more details, please, refer to the RM rev 12.1 section "36.4.4.1.9 Data Flash Protection Register (FDPROT)" and "36.5.1 Flash protection"

In the Startup_S32K144.S you can see this section:

For the read-protect Dflash, you can look at the "chapter 15 Memory Protection Unit (MPU)"
You can set the rights for Core, DMA, etc.
Example mpu_memory_protection_s32k14x is located in the S32Design Studio:
"The purpose of this demo application is to show you how to configure and use the Memory Protection Unit of the S32K14x MCU with this SDK."
I hope it helps.
Best regards,
Diana