Hi Karimla,
Normally, Mobile data should be turned off automatically by the system when WiFi is connected. If you're sure it's mobile data which is on, you could try some automation tools to handle this, e.g. Tasker (Condition: WiFi connected, Task: mobile data off).
Thanks