If you want to test whether Z moderates the relationship between X(IV) and Y(outcome) create a new variable by multiplying Z*X. This is your interaction term. Enter X, Z, and X*Z as predictors into a regression with Y as the dependent variable. The coefficient for X*Z tells you how much the coefficient for the relationship between X and Y changes for each unit of Z ( Or alternatively, how much the coefficient for the relationship between Z and Y changes for each unit of X).
You may find Aiken and West's book, Multiple Regression: Testing and interpreting interactions, helpful.
If you want to test whether Z moderates the relationship between X(IV) and Y(outcome) create a new variable by multiplying Z*X. This is your interaction term. Enter X, Z, and X*Z as predictors into a regression with Y as the dependent variable. The coefficient for X*Z tells you how much the coefficient for the relationship between X and Y changes for each unit of Z ( Or alternatively, how much the coefficient for the relationship between Z and Y changes for each unit of X).
You may find Aiken and West's book, Multiple Regression: Testing and interpreting interactions, helpful.
I second Judith's recommendation of the book by Aiken & West. It's a real classic. However, bear in mind that when it was written, SPSS lacked some tools that it has now. E.g., the GLM and UNIANOVA commands can be used to estimate the same regression models as REGRESSION; but they have an EMMEANS sub-command that allows you to (fairly easily) generate fitted values of Y (with CIs) at selected combinations of the interacting variables. Here's an example that uses one of the sample data files that comes with SPSS--you'll just have to change the path to the folder where you store those files. (Also, RG will probably insert a bunch of blank lines that you'll have to remove from the syntax.)
NEW FILE.
DATASET CLOSE ALL.
* Modify path to show where you store the sample files.
GET FILE='C:\SPSSdata\survey_sample.sav'.
* OLS linear regression model with 2 explanatory variables and their interaction.
* Let Y = educ (years of education), X1 = Age, X2 = paeduc (father's years of education).
COMPUTE Y = educ.
COMPUTE X1 = Age.
COMPUTE X2 = paeduc.
COMPUTE X1X2 = X1*X2.
REGRESSION
/STATISTICS COEFF OUTS CI(95) R ANOVA
/DEPENDENT Y
/METHOD=ENTER X1 X2 X1X2.
* Note that the same model can be estimated via UNIANOVA.
* Note too that it does not require computation of a product term--
* the product can be indicated on the DESIGN sub-command.
* Also, UNIANOVA's EMMEANS sub-command can be used to
* generate fitted values of Y (with CIs) at selected combinations
* of the interacting variables.
DESCRIPTIVES Y X1 X2.
UNIANOVA Y WITH X1 X2
/EMMEANS=TABLES(OVERALL) WITH(X1=20 X2=5)
/EMMEANS=TABLES(OVERALL) WITH(X1=20 X2=10)
/EMMEANS=TABLES(OVERALL) WITH(X1=20 X2=15)
/EMMEANS=TABLES(OVERALL) WITH(X1=50 X2=5)
/EMMEANS=TABLES(OVERALL) WITH(X1=50 X2=10)
/EMMEANS=TABLES(OVERALL) WITH(X1=50 X2=15)
/EMMEANS=TABLES(OVERALL) WITH(X1=80 X2=5)
/EMMEANS=TABLES(OVERALL) WITH(X1=80 X2=10)
/EMMEANS=TABLES(OVERALL) WITH(X1=80 X2=15)
/PRINT PARAMETER
/CRITERIA=ALPHA(.05)
/DESIGN=X1 X2 X1*X2 .
* To make it easier to work with the fitted values generated via EMMEANS,
* use OMS to save them to a new dataset. Then you can fairly easily
You can also use Hayes' PROCESS plug-in for SPSS (See https://www.processmacro.org/download.html). It is free. very robust and it can be used to test complicated effects in regression models such as moderated mediation analysis.