Exact use case of SystemVerilog virtual functions

This is a very basic principle of object oriented programming and there are many online resources available to help you. Try https://verificationacademy.com/courses/introduction-to-the-uvm, specifically the section on object oriented programming.