Golems are Immune to Spells
Immunity to a specific type of effect in Pathfinder 2nd edition is defined as:
If you have immunity to a specific condition or type of effect, you can't be affected by that condition or any effect of that type. You can still be targeted by an ability that includes an effect or condition you are immune to; you just don't apply that particular effect or condition.
So the effects of spells don't apply to golems because of golem antimagic.
The rules on Reading Spells define the effects of spells as:
A horizontal line follows saving throws and duration, and the effects of the spell are described after this line.
Being unaffected by something like disintegrate clearly means that targeting the golem directly has no effect—they don't take damage from the spell or get turned into fine powder. But what happens when the spell targets the ground beneath the golem?
The golem's immunity doesn't extend and protect the ground beneath it, so up to 10 cubic feet of material would be destroyed by the effect. Then the forces of gravity would cause the golem to fall, which isn't an effect of the spell so golem antimagic doesn't prevent it. The golem does not float in the air above the hole because the ground was destroyed by something the golem was immune to.
More broadly this distinction is described by the second emphasized section quoted above, that immunity prevents just the particular effects of the spell rather than any further consequences arising from those effects. Additional specific examples below hopefully highlight what this means for different types of spells.
Grease
Grease when cast on an area has the effect that creatures must attempt Reflex saves or fall. A golem is unaffected by the spell, so it would not need to make saves or have any enhanced risk of falling.
Likewise when the spell is cast on an item, the effect is that creatures who interact with the item must attempt Reflex saves or drop it. The golem being still unaffected by the spell would not need to make those saves either.
Shield
Shield grants the caster a +1 circumstance bonus to AC and allows them to block attacks with their magical shield. The spell doesn't give any effect to a golem that attacks the caster, so golem antimagic would not apply.
Oneiric Mire
Mentioned in a comment, oneiric mire turns the ground into difficult terrain and requires creatures within that area to roll saves against being immobilized.
The immobilization part would directly affect the golem, so that would be ignored due to golem antimagic.
The ground becoming difficult terrain doesn't directly affect the golem, so the golem would be still be affected when moving through that area.
Another way of thinking about the distinction is that this part of the spell has an effect on the ground, while that ground then has an effect on the golem. The golem is only immune to cases where the spell has an effect on them.
Telekinetic Projectile
Finally there's the interesting case of telekinetic projectile, where the spell hurls an object at the target and deals damage to them when it hits.
Hurling an object towards the golem doesn't actually affect them, so golem antimagic doesn't prevent that part of the effect from applying. But when the object would hit the golem and deal damage as part of the spells explicit effect, the golem would be unaffected due to their immunity.
If the spell was able to hurl an object arbitrarily and the caster threw one above the golem, then it could deal damage to the golem as any other falling object. The difference stems from the fact that dealing 1d6 + spellcasting ability modifier is part of the spell's effect rather than some incidental result of an object moving very fast and hitting someone, like through falling or environmental damage.
To demonstrate this at a further extreme of consequential effects, hurling a knife to cut a rope suspending a some larger object above the golem wouldn't cause that object to float in mid-air or have no effect on the golem when it falls. It would fall and deal damage normally because that's again not a particular effect of the spell.
All of this hearkens back to the core argument, that only a spell's particular effects are negated by golem antimagic rather than any consequential or incidental results.