Its not uncommon for Supreme Court Justices to publish books; however this is typically done after they've served for some time.
For example, Ruth Bader Ginsburg, who started serving on the Supreme Court in 1993, wrote a book in 2018, "My Own Words".
By comparison, Barrett has only served a few months.
In my opinion, Supreme Court Justices should be barred from non-salary income, as that can inappropriately sway their opinion, or at least have the appearance of impropriety. To compensate for this, I would have no issues with increasing their salary.