Software: QGIS 3.x
If you want the x and y coordinates for point data it’s fairly simple to do in QGIS 3.x. There’s actually two ways you can go about doing this – with the first explanation being the easiest the second explanation being a bit more flexible.
Add your data to qgis.
Once it has been added go to the processing tools and search for the added geometry values tools.
Execute the tool. It will create a new layer called Added Geometry Info. That will add a xcoord and ycoord to your data.
The second way to derive X and Y is to use the Field Calculator. Open the Attribute table and start editing.
Open the Field Calculator and you can add and calculate a new field at once. Add a field called xcoord and add $x into the expression builder. Click OK and you have a new field called xcoord that has been calculated.
To repeat with the y coordinate just add a ycoord field and use $y in the expression builder.