Hi,
To return to the question of categorical variables and their encoding, I encourage you to have a look at these documents:
https://www.jmp.com/en_nl/statistics-knowledge-portal/what-is-multiple-regression/mlr-with-categorical-predictors.html
https://community.jmp.com/t5/Statistical-Thinking-for/Fitting-a-Model-with-Categorical-Predictors/ta-p/271960
These documents are taken from two very useful resources: the SFP (Statistical Knowledge Portal: https://www.jmp.com/en_nl/statistics-knowledge-portal.html ), which contains explanatory documents on various statistical topics, and the STIPS (Statistical Thinking for Problem Solving https://www.jmp.com/en_us/online-statistics-course.html ), which take an applied approach to statistics by going back to the fundamentals.
Have a nice day,
Florence