There are numerous ways to go about in editing an .htaccess file.
On Microsoft Windows
* Edit the file with Microsoft Notepad then upload via SFTP/FTP.
* Use WinSCP and the Edit Mode feature.
* Use SSH and any text editor.
* Use the File Manager in cPanel.
On Apple macOS
* Edit the file with TextEdit then upload via SFTP/FTP.
* Use the File Manager in cPanel.
In my opinion, the easiest way to edit a .htaccess file for novices is through the File Manager in cPanel but you must remember to make a backup for editing.