Xavier NX external SD card hot plug in/out on custom board (JetPack 4.6)

That is why you can refer to other posts… they already shared the answer. Also, they even use the same GPIO as your case…