The correct action is to run a command like this on the source machine:
BACKUP DATABASE db TO DISK = 'C:\temp\db.bak' WITH INIT, COMPRESSION, COPY_ONLY
The actual path is your own choice of course. "db" here is a placeholder for the actual name of the database name.
Then you copy the .bak file to your machine where first run:
RESTORE FILELISTONLY FROM DISK = 'C:\temp\db.bak'
You pay attention to the names in the first column, LogicalName. Presumably, they are db and db_log, but you cannot take this for granted.
Then you run this command:
RESTORE DATABASE db FROM DISK = 'C:\temp\db.bak'
WITH MOVE 'db' TO 'C:\Program Files\Microsoft SQL Server\MSSQL15.LYTEC_SQL\MSSQL\DATA\db.mdf',
MOVE 'db_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL15.LYTEC_SQL\MSSQL\DATA\db.ldf'
Since you already have the database files on your computer,, there is an alternate way by attaching these files to the server. However, BACKUP/RESTORE is the civilised way to copy a database, and I don't want to encouraging copying of database files, which is error prone and can lead to accidents - not only on the target server but also on the source instance.