My ticket is from Mumbai (India) to Dallas via Newark. Where the customs and visa formalities will be don - at Newark or at Dallas?
You will go through immigration (passport/visa control) and customs at your first port of entry in the United States, so Newark. The Newark-Dallas flight is a domestic (internal) flight, so you must have officially entered the US first.
Note that unlike many other countries, you will need to wait for your luggage at Newark and go through customs, and them drop them off at a counter just after customs (provided both your flights are on a single ticket of course).
Just to be sure, you are aware that most people are currently not allowed to travel from India to the US at this time, right? Only US citizens and permanent residents, some of their family members, and a limited list of exemptions are allowed. You will also need to have a negative Covid test less than 3 days before departure.