Get the TestDataFactory
class by installing the TestDataFactory Unlocked Package 🔓📦 in your org using the UI or by running the following DX command
sfdx force:package:install --wait 10 --publishwait 10 --package 04t1n000001YVMdAAO -r -u AliasOfYourOrg