>>2024091yeah, that's dangerous. it looks like there's a crack in the weld already . it also looks like it's missing an adjuster nut that screws down over the headtube, then the notched washer, then the locknut. but maybe that flat thing is correct for that headset, I don't know. but yeah, your locknut is doing absolutely nothing all the way up there and without it, it's stressing where everything joins together.
buy or borrow a pipe cutter or wrap the tube evenly with tape for a guide and very carefully saw a straight line with a hacksaw. you can just buy a blade and wrap one end with cardboard and tape for a handle since you're obviously poor.
you have to size it carefully so it still has enough threads for the locknut, click the parktool link in op and search how to do it . " cutting steerer tube on a threaded fork"
when you lift up the bike does the fork slide down and fall until it hits the locknut? if so you're missing a critical piece and you will probably have to get a new headset to get it.