@bhavikakhare When something works in Preview but not in Live it is most likely some type of permission or setting error. When the error is code, logic or element setting it will not work at all.
If you are testing anything that has to do with ‘who is logged in’ ---- and if it works in Preview ---- know that the editor will always detect an Admin as the tester (unless otherwise coded by you). If you are checking on the live site, and running a code that is dependent on who is logged in or how they are tagged, etc ----- and it is not working, then it has to do with Permissions. I recommend to check your permissions.
Here is troubleshooting article that explains the most popular errors that cause things to work in Preview but not on the Live site (#1 and #2 are most likely the cause of your error):