If the book title and the magazine title have the same name, they are not within the scope of copyright protection. Publicly available magazines trademark their names, so your book title infringes upon that magazine's trademark rights.
my country's "Copyright Law" mainly deals with a series of matters including the right to publish works, the right to authorize, the right to modify, the right to protect the integrity of the work, the right to copy, the right to distribute, the right to adapt, the right to rent, the right to network dissemination, etc. The content of works is the main object of protection. Therefore, you have full copyright (i.e. copyright) in your work, which means there is no issue of infringement of the magazine's copyright.
If the magazine has registered a trademark for its magazine name, then your behavior infringes upon the magazine’s exclusive trademark rights. The other party may require you to stop the infringement and compensate for the corresponding losses in accordance with the relevant provisions of the Trademark Law. If the infringement causes adverse social impact and the circumstances are serious, criminal liability will also be pursued.