Thanks to @phoog’s suggestion, I kept my boarding pass and did a little more.
Since I was worried that it would give me trouble when I’d leave the Schengen Area, I went to the airport police station and they helped me solve this problem. I just showed them my passport and explained what happened, and after checking my boarding pass, they crossed out the wrong exit stamp and stamped the entry stamp for me. I have not encountered any problem when crossing the Schengen border afterwards.
Credit:stackoverflow.com‘