I upgraded a world to 1.18. I was generating new chunks and filling out maps, and it was running fine, but I've found a spot in an ocean biome that partly freezes the game. I can still move, but no more chunks will load, I can't interact with anything, commands won't function, and when I save and quit it gets stuck loading so I have to force quit. It's the same spot every time. I have 8GB of ram allocated, and I tried optimizing the world and it didn't help. I don't know if this is a world generation issue or something specific to that area.
I am seeing a similar thing happen in a 1.18 server that was upgraded from 1.17. You can walk through the affected chunk, you can place blocks in place of air blocks, but you can't change any existing blocks.
If you do /data get block (coords) on a block entity you get "That position is not loaded" so the chunk is basically both visible and not loaded. Weirdest thing I have ever seen.