Should you forget the user code, it might be possible to open without the need for a locksmith or safe engineer. However, it depends on the type you have purchased.
If you purchased an entry-level model, there should be an emergency key. This will allow you to override the digital keypad and open your safe. There will have been two keys supplied if this is the type you bought. If you have lost these keys then you will need to enlist a locksmith to open it.
Safes with insurance approval
Models with insurance approval, do not have this override facility. This will require a safe engineer to drill or pick the safe open in this instance. Despite this, it does mean the safe can be used in future but it may require a new lock to be fitted. The replacement cost will be dependent on the rating of the safe and the lock specification to suit your needs.