R411: RAW:
- Cantrips should not appear in spellbooks. Only spells of 1st level or higher may be added. (PH-p.114 [green sidebar])
- You can create a spell scroll of a cantrip, but it must be prepared or from known spells. (XGtE-p.133)
Since your DM is the final arbiter of the rules please them about their reasoning for giving you a spellbook with cantrips. They may be unaware of the RAW, or are aware and have something else in mind.