You should keep good records of inventions since the United States uses the ‘first to invent’ system.
Most of the rest of the world grants patent priority to the first inventor to file a patent application. Filing is important in the United States as well, but if a dispute arises, invention notebooks and the like will be used to determine which inventor invented first. Use a notebook with bound numbered pages and sign and date pages as you make progress on your invention. A disinterested third party should witness and sign the notebook as well.