Settings to enable archivelog mode:
SQL> archive log list; #Check if archivelog mode is available

The archive destination USE_DB_RECOVERY_FILE_DEST defaults to the flash recovery area ($ORACLE_BASE/flash_recovery_area). You can view flash recovery area information using the following SQL:
SQL> show parameter db_recove
#The size is 3882M, which can be configured during installation. If the flash recovery area is fully utilized up to 3882M, archivelogs may fail to archive further, causing the database to hang. The typical solution is to increase the flash recovery area size:
SQL> alter system set db_recovery_file_dest_size = 10G; #Adjust archivelog space size to 10G
Alternatively, set a specific archive directory directly (recommended, not limited by size):
SQL> alter system set log_archive_dest_1='location=/data/oracle/recovery_area'; #This setting does not take effect immediately; a database restart is required.
#Then start the database to the MOUNT state, change the database to archivelog mode, and then open the database to the OPEN state.
SQL> shutdown immediate ; #Shut down the database immediately
SQL> startup mount; #Start the instance and mount the database without opening it
SQL> alter database archivelog; #Change the database to archivelog mode
SQL> alter database open; #Open the database
SQL> alter system archive log start; #Enable automatic archiving
SQL> archive log list; #Check the database archiving status again
SQL> alter system switch logfile; #You can verify if the archive destination is set correctly by switching logs and checking whether archivelogs are generated in the archive path.