How to apply Static Data Masking With Replication of Database
These are out of the box features of SQL Server so you'll essentially need to follow the Microsoft Books Online and other resources on setting them up. Replication has a lot of small steps and basic prerequisites but it's essentially a wizard, so it's rather simple if you just follow the documentation carefully.
Here's some helpful references for setting up Replication:

Microsoft Books Online - SQL Server Replication

Quick walkthrough on setting up Replication

More in depth walkthrough for setting up Replication


And here's some good resources on implementing Static Data Masking:

Microsoft Books Online - Static Data Masking for Azure SQL Database and SQL Server

SQL Server Static Data Masking Example

Static Data Masking in SSMS 18


Please note that Static Data Masking is only available in SQL Server 2019 (or equivalent Azure SQL Database version). So if you're on an older version of SQL Server, the alternative option available is called Dynamic Data Masking.