Actually, I need to choose randomly 50 participants from a dataset with 130 participants. The only way I know now it's create vectors that's why my code consists only of 10 values and not of 130.

Could please help me to optimize the code? [I'm learning R only for a month]

I don't really understand what you mean by this but selecting a sample number of rows from a data set only requires use of sample_n(). In the example below, I'm randomly selecting 3 rows from your data set.

Also, set.seed() takes a single value for the seed parameter, not a vector.

Where does your data set reside? If it's in a CSV or an Excel sheet, you could read it into R using appropriate functions. That would save you the trouble of creating the data frame by hand.