A few general best practice for triggers that applies generally
- One Trigger per object
- Keep SOQL queries outside of loops by leveraging collections (Lists,
Sets, Maps)
- Keep DML outside of loops by leveraging collections (Lists, Sets,
Maps) and performing DML on a collection rather than individual
records
- Keep logic outside of the trigger itself. Keep your logic in helper
classes that helps in making your code portable and reusable.
Your particular use case seems pretty simple as your logic can be achieved in a before trigger, which will require no DML calls in the trigger at all. You can change the records prior to them being committed to the database. Unless there are other requirements, its also worth noting a trigger might not even be necessary here as what you described can be achieved with a Work Flow Rule.
If you share your code that you have for the trigger so far, would be happy to help optimize it or try to find any errors you might be running into.
before
trigger and shouldn't require any additional DML. It's also worth noting that simple logic such as you've described can be easily accomplished using a Workflow Rule and a Field Update, rendering your trigger unnecessary.