There may be times when you need to center an object in Photoshop. Whether you are on Mac or Windows, the procedure is the same.
Steps

Step 1. Open a Photoshop project
Your project must contain at least one object (text or image) to center.

Step 2. Click View
The tab is at the top of the Photoshop window on PC or at the top of the screen, if you're on a Mac. A drop-down menu will then appear.

Step 3. Select Magnetism
The option is in the drop-down menu that just opened. Once selected, you should see a check mark appear to the left of the option. This means that it is now activated.
If there is already a check mark, then it means that the option has already been activated

Step 4. Select the layer to center
In the window Layers Photoshop, click the name of the layer you want to center. This will select the layer in the main window.

Step 5. Center the layer
Click and drag the layer in the middle of the window. You need to position the layer as centrally as possible.

Step 6. Release the mouse button
The object should then position itself in the center of the grid by magnetism.
Advice
- Some objects (like text) can be centered by pressing Ctrl + A on PC, or ⌘ Command + A on Mac. This will select all the objects in the window. Then click on the button Align centers horizontally, then on the button Align centers vertically. The buttons are located at the top of the main window in the tool options.