Welcome to the Strapi Community 
In this
Migration Guide it will show what you need. you will need to do each of the steps
- Migration guide from 4.0.6+ to 4.1.8
- Migration guide from 4.1.8+ to 4.1.10
- Migration guide from 4.2.x to 4.3.x
- Migration guide from 4.3.6 to 4.3.8
- Migration guide from 4.4.3 to 4.4.5
- Migration guide from 4.4.5 to 4.5.1
- Migration guide from 4.5.1+ to 4.6.1
I would suggest you read as some might need to change a number and yarn install etc.
Some have some more changes that require file changes etc.