Do I have to write some code in .htaccess?

If the .htaccess file is not writable, in order for Hide My Wp Ghost to work you need to write the code you receive in the Hide My Wp Ghost > Permalinks after you change the settings.

If you don’t have server access you can install a plugin that will help you with this:
https://wordpress.org/plugins/wp-htaccess-control/

You can remove the wp-htaccess-control plugin after you’re done with the setup.