Welcome to the community!
There are 3 folders of the SonarQube server installation that should be persisted:
sonarqube/data keeps the ElasticSearch data such as the cache, index… this is a fundamental part for the functioning of SonarQube and you surely do not want to lose this data each time you recreate the SonarQube container as it could imply large boot times.
sonarqube/extensions keeps the SonarQube plugins that you have installed via the marketplace or other means. Probably not handy to have to re-install everything each time.
sonarqube/logs keeps the logs.
Not having the above folders persisted would pose many potential issues for a production level SonarQube instance in several scenarios and so, I strongly recommend you to look for a way to persist this.