There are numerous posts here on this topic. The VSC and TRAC lights will go out when the MIL is cleared.
What is the exact P code? Are the codes being read in generic mode or Toyota specific mode?
Did you buy an aftermarket fuel cap or a cap from the dealer? If you bought an aftermarket cap, you just put on a bad part.
The MIL probably will not go off by itself, so you will need to have the code cleared.
I am a firm believer in testing before replacing. Anyone can shotgun and eventually repair the problem, but at a considerable expense.
Your RAV has a built in EVAP self test that can be run to determine which part of the system is causing the MIL to illuminate.