Automatic Failover on SQL Server Always On Availability Groups is not triggered when primary replica becomes offline
Add a quorum configuration in the failover cluster manager. In order for the cluster to continue to be online a majority of nodes need to be online, you have only two nodes. If one goes down, only one is online and that’s not majority. If you add a witness like shared drive which needs to be stored off the nodes, then if one node goes down, majority two are still online so cluster will remain online.