I submitted a bank statement with 2370jod for the bank account I get my salary into and after 2 days I had to withdraw 500 jod to give to someone and now since I got them back should I deposit them back or not ?
You should make sure your bank statements help you demonstrate that you have a stable lifestyle at home, and that you have enough funds to support yourself for the entire duration of your trip. Do not try to play the system and do not overthink this. Just be truthful when applying and make sure you meet the requirements to be eligible for a visa.
Having said this, I think it is more likely that removing 500 after submitting the statement will be construed as funds parking, than putting the same amount back once the money returns to you. Hence, I would put them back and I would not think about it too much. In addition, it is your money and you can prove its origin so i do not see anything fishy here.
Do note that at the end of the day the decision lies within the Immigration Officer's hands and solely they can decide whether or not you are eligible for the visa.