Hi Dr-Asmaa, thank you for posting in Apple Support Communities.
The Apple Pencil should be fine to use but when you connect it to your iPad please ensure it is fully charged before use to minimise any issues. The following link explains all about how to use the Apple Pencil:
https://support.apple.com/en-au/HT211774
Nevertheless, if it does not work please go through the steps in the following link:
https://support.apple.com/en-au/HT205236
And if you do experience issues and the above links have not resolved your issue, it should have a 12 month warranty period, and you should then contact Apple Support for further resolution options or progress a replacement.
You can do this as follows:
I hope you get as much joy and productivity out of your new Apple Pencil, when it arrives, as I have done with mine.