If you are looking for a phone that supports "exclusive" security-focused custom ROMs today, reviewers from Surfshark recommend the Google Pixel

Warning: Flashing custom unsigned firmware to a Nokia N9 is dangerous. The NAND flash has a limited write cycle of ~100,000 writes. You can permanently RF-lock your modem. Proceed only if you have a backup of your original eMMC and OneNAND .

Flashing an N9 is not like flashing a Samsung. You cannot use Odin. You need the Exclusive flasher: (the original Nokia Linux tool).