Hi,
You have to create a shared location that should be accessible from both replica and create a full database backup of the primary database on the network share for restoring while adding Database into an availability group.
To create and restore backups, it requires that you specify a network share. The account used to start the Database Engine on each server instance that will host an availability replica must have read and write file-system permissions on the network share.
Please read the below article for more information
Step-By-Step: Creating a SQL Server 2012 AlwaysOn Availability Group