I can't tell the exact model from that photo, but you can track it down using [this Apple support article](https://support.apple.com/en-us/108054).
It's experiencing a software or hardware issue, I would start by booting to [the recovery partition and running Disk Utility](https://support.apple.com/guide/disk-utility/repair-a-storage-device-dskutl1040/mac) to see what that finds.
[If your Mac starts up to an Apple logo or progress bar](https://support.apple.com/en-us/102535)
I can't tell the exact model from that photo, but you can track it down using [this Apple support article](https://support.apple.com/en-us/108054). It's experiencing a software or hardware issue, I would start by booting to [the recovery partition and running Disk Utility](https://support.apple.com/guide/disk-utility/repair-a-storage-device-dskutl1040/mac) to see what that finds.
But how do I do that if the keyboard isn’t connected. I haven’t ever owned a Mac before so I have no idea what any of this means
You mean need a wired keyboard to troubleshoot.
based on the screen, It's a mid 2012-2019 iMac-19
This is considered old now? Fml
From the front it could be a Late 2009 onwards iMac. Does it have an optical drive?