Hello there :)
Within and inside are generally interchangeable in whatever context however 'inside' is usually more common whilst 'within' can be regarded as quite formal.
For example: 'The cat is inside the box' - 'The cat is within the box'
Both mean precisely the same thing, however 'inside' does sound more natural.
I hope this helped! :)