Factors are not invented, they're discovered.
Prime numbers, for example, 2, 17, 31, 47, 97, don't have factors, other than themselves and 1. Prime numbers are the building blocks of all numbers, but there's an infinitude of prime numbers.
All other numbers (whole numbers) are made up of products of prime numbers. For example, 15=3×5, and 3 and 5 are the prime factors of 15; 343=7×7×7, so 7 is the prime factor (3 times) and the factors of 343 would be 7 and 7×7=49 as well as 343 and 1.
Factors have always existed because numbers themselves are timeless, outside of all time. But factors are discovered by you and me as part of our natural learning process, maybe when we start learning our times tables.