与 is read yǔ and means “with”; 写 is read xiě and means “to write.” They look almost the same, but they sound different and mean different things. In the HSK they first show up as 与 as a word on its own (HSK 6) and 写 as a word on its own (HSK 1).
与yǔwith
写xiěto write
An HSK 4 group: Both characters already appear in that level’s vocabulary.
Practice them in Wanyu: the “Look-alike characters” game alternates seeing them and telling them apart. Free.
Where will you see 与 and 写? The HSK words that use them
In Wanyu, the “Look-alike characters” game quizzes you on these groups both ways: you see the character and say which one it is, or you see the meaning and pick the character. Free, like the whole HSK library with audio.