Is this ok?

This is a new unlived in house. Under ground service.

It could be OK but more details would be needed to answer the question. That’s SER cable with the bare conductor cut off since only three conductors are needed for the service. SER cable cannot be run underground.

Just to clarify.

You can in a conduit, right?

What type of electrical cable do I use to run electricity to my barn or garage?

If it’s above ground or in conduit you can use SER (Service Entrance Cable).

Bet the SERs is only run to the meter.

According to the NEC SE cable cannot be used underground with or without a raceway.

From the looks of the connector in photo #1 I would guess that there is no raceway entering the panel.

If this is a main panel and the SER is coming directly from the service meter this would be ok.