Put a vacuum gauge on it. low steady vacuum is a problem, or something that affects all the cylinders, worn timing chain, lean fuel etc. . If the needle bounces it is a valvetrain issue, broken valve spring flat cam etc. If it has normal vacuum then it may be electrical.

https://m.roadkillcustoms.com/diagnose-common-engine-problems-vacuum-gauge/#:~:text=Vacuum%20Gauge%20Engine%20Condition%20Indicators%20%20%20,Confirms%20worn%20rings.%20%2012%20more%20rows%20