What model HP computer? Some use integrated graphics and other may have a dedicated video card that can be replaced if it’s gone bad.
There may be other ways to test what is wrong but take a little work. If your computer has another video connection like HDMI you might try hooking up to a tv for example. Another option is take it some place and see if they can tell you what is wrong. They will probably have more equipment to test things out.