Hi! I’m Chinese and this is incorrect. 吗 (mā) and 边 (biān) actually have the same flat intonation, so there isn’t a rise in pitch in either of the questions. To answer OP, the word 吗 in particular is just typically used to end off some sentences in order to differentiate whether they are statements or questions, ie. 你要回家。(You want to go home.) vs 你要回家吗?(Do you want to go home?)
Joe mama