Unity game works flawlessly in editor but issues when built

I have a basic game that is having issues when built, when I play it through the editor, it works flawlessly.

But when it is built as a windows standalone, it is very jittery, the player movement is uncontrolled and suddenly gets thrown around, and the ball no longer follows the path.

I have also built it as a WebGL, it works as it should, the character moves and ball follows, although it still has the previous surges and looks laggy. What could cause this? Have I missed something somewhere?

I have made a video showing what I mean.

Edit:

I have since figured out the lagging issue I was having was due to the camera follow settings, changing it to a lower number has fixed that, but the windows stand alone issues sill stump me, as it works great when built as WebGL

One thing that often causes problems in builds is that it’s possible for monobehavior messages to run in a different order from the editor. For example awake always runs before start, but object A’s awake might not always run before object B’s awake, or objects A’s Update may not always run before object B’s update.

In the case of a camera that follows the player, you may be Updating the camera’s position in Update, and that might seem to work fine as long as the camera’s Update happens to run after that player’s update, but if the camera’s Update just happens to run before the player’s update then the camera following is going to lag one frame behind, giving a jittery look. I don’t if that’s what’s happening in your case, but that’s something you can check.

If you need Updates to resolve in a certain order, you can set that in the “Script Execution Order” settings but it’s often easier to move the logic to LateUpdate which always runs after all the Updates finish.