I downloaded the SF Pro font installer at https://developer.apple.com/fonts
In the installer, I see some interesting license agreement terms:
"IMPORTANT NOTE: THE APPLE SF PRO FONT IS TO BE USED SOLELY FOR CREATING MOCK-UPS OF USER INTERFACES TO BE USED IN SOFTWARE PRODUCTS RUNNING ON APPLE’S iOS, iPadOS, macOS OR tvOS OPERATING SYSTEMS, AS APPLICABLE."
and
"B. Other Use Restrictions. The grants set forth in this License do not permit you to, and you agree not to, install, use or run the Apple Font for the purpose of creating mock-ups of user interfaces to be used in software products running on any non-Apple operating system or to enable others to do so. You may not embed the Apple Font in any software programs or other products. Except as expressly provided for herein, you may not use the Apple Font to, create, develop, display or otherwise distribute any documentation, artwork, website content or any other work product."
According to my read of this, you cannot use SF font for a book. If you are unsure of any of the license terms I would consult an IP attorney before using the font.