Hi @mondliengcobo
Here's a [https://www.hardreset.info/devices/samsung/samsung-galaxy-a21s/codes/#Service%20Mode|link] showing the secret codes for the phone.
Dial the code for the ''Test Mode'' and check what the result is when testing the front camera.
If the camera is faulty here's the [document|35478].
Go to Sect 8-4-17 on p.21 (of 24) to view the troubleshooting procedure for the front camera.
There are board layout diagrams showing the location of the components mentioned in the flowchart.
If the front camera module is faulty and needs to be replaced, search online for ''GH96-13484A'' to find suppliers that suit you best.
Here's a teardown [https://www.youtube.com/watch?v=JFn0IVdunzs|video] for the phone that may also help.