While and whereas have the same meaning when expressing contrast between two things. Example would be - 'Some married couples argue all time, whereas( while) others never do.'
Here you can use both while and whereas.
They differ in meaning when we refer to time or some type of duration in a sentence. For this you would only use while. For example: "While I was studying, she was watching movies."
Here, you wouldn't be able to use whereas.
Hope this helps!