to leave the Beta Program you will need to follow these steps: Open the Samsung Members app. Tap the three-dot menu and enter Settings. From here, tap One UI Beta Program status. Hit the Withdrawal button and tap Next.
I will add to @TessM post Backup your data first Just so you know that some that have left the Beta program, have experienced issues with some apps. So you may need to reinstall some apps If you are experiencing problems with the One UI 5 Beta You should have access to the Beta forum through the Members App to ask any questions, to get possible answers