If primary side of Availability Groups (AG) is down and can not be online, you can perform failover operation. When primary side is down, probably, you can see state of Availability Groups at the secondary side like below.
Failover Steps
If you get an error after click Failover button, probably your AG has a problem. You can use force manual failover steps. Steps is here : https://www.fatihacar.com/blog/mssql-server-2012-availability-groups-ag-force-manual-failover/
You can see your database status like below after failover operations.
SQL Server 2012 Availability Group install and configure steps are here : https://www.fatihacar.com/blog/sql-server-2012-alwayson-availability-groups-insallation-and-configuration/