Usually memory models are used to store data, and should have some APIs to load the hex files into memory locations by backdoor writes. Or you can do a frontdoor load using a UVM agent and depends on what the interface is. For example, the top level design may have an AHB bus which is connected to a bus matrix and internally connected to RAM module. In this case, you would need an AHB agent to load memory. The hex files will have to be read into a local testbench variable and then use a sequence that will start a sequence_item on the agent with the correct address and data pairs. To take a very simple example, the first line of the hex file is 0xabcd1234, a 4 byte word that should be loaded into say location 0x3000 and the next 4 bytes should be loaded to next location and so on. This totally depends on the RAM size, number of banks, if they are interleaved, etc.