Assuming the text to be in cell A1 try:
=LET(t,TEXTBEFORE(TEXTAFTER(A1,"---",1),"---"),IF(LEFT(t,1)="6",t,"N/A"))