340 Running super weird

The answer to your question with the limited amount of info we have been given is:

You now have to start with a series of checks to reinstate everything back to the way it was or an oem setting on the distributor itself, then physically finding top dead Center number 1 on the engine, re-installing the distributor with an approximate 10 degrees advance on it, putting back the distributor cap and ensuring all the plug wires are in the correct order, then starting it, warming it up, checking base timing with vac advance hose off and plugged, set base timing to 12 or 14 or whatever your car liked before, then taking a vacuum gauge out and setting idle air mixture screws for peak vacuum and engine rpm, once found enriched the screws about an 1/8 turn at most, just slightly richer than peak.

All of this should put you back to your happy spot.

Good luck